New webservice API

Lubomir I. Ivanov neolit123 at gmail.com
Sun Jan 27 10:31:36 PST 2013


On 27 January 2013 20:20, Pierre-Yves Chibon <pingou at pingoured.fr> wrote:
> On Sun, 2013-01-27 at 20:18 +0200, Lubomir I. Ivanov wrote:
>>         session = soup_session_async_new();
>> -       strcat(url, "http://api.hohndel.org/api/mydives/");
>> +       strcat(url, "http://api.hohndel.org/api/dive/get/?login=");
>>         strcat(url, user_id);
>> -       strcat(url, "/xml");
>
> This will not be enough, you need to specify the 'Accept' header to
> text/xml otherwise it will return you json.
>

	strcat(url, "http://api.hohndel.org/api/dive/get/?login=");
	strcat(url, user_id);
	msg = soup_message_new("GET", url);
	soup_message_headers_append(msg->request_headers, "Accept", "text/xml");
	soup_session_send_message(session, msg);

this should do it then then?
patch attached.

lubomir
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-webservice.c-new-URL-for-the-webservice-API-update.patch
Type: application/octet-stream
Size: 1143 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130127/12a03aea/attachment.obj>


More information about the subsurface mailing list