From 3aa41635f0d1e17acc39d0356f7f1ff06d093251 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sun, 27 Jan 2013 20:31:36 +0200 Subject: Support the webservice API update Also make sure to pass the "Accept" request header set to "text/xml", so that XML is retrieved. Signed-off-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- webservice.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'webservice.c') diff --git a/webservice.c b/webservice.c index 88aea2743..243d9b5a0 100644 --- a/webservice.c +++ b/webservice.c @@ -48,10 +48,10 @@ gboolean webservice_request_user_xml(const gchar *user_id, gchar url[80] = {0}; 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"); msg = soup_message_new("GET", url); + soup_message_headers_append(msg->request_headers, "Accept", "text/xml"); soup_session_send_message(session, msg); if SOUP_STATUS_IS_SUCCESSFUL(msg->status_code) { *len = (guint)msg->response_body->length; -- cgit v1.2.3-70-g09d2