New webservice API

Pierre-Yves Chibon pingou at pingoured.fr
Sun Jan 27 10:34:38 PST 2013


On Sun, 2013-01-27 at 20:31 +0200, Lubomir I. Ivanov wrote:
> 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.

Sounds correct.

Dirk, should we merge new_api into master then?

Pierre


More information about the subsurface mailing list