summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2013-01-27 20:31:36 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-29 20:34:05 +1100
commit3aa41635f0d1e17acc39d0356f7f1ff06d093251 (patch)
treecd2a218be55cd29de47439e4d0813c33348b7420
parenta61877d1d4efdd1ed295d31b0b3042ca44747b25 (diff)
downloadsubsurface-3aa41635f0d1e17acc39d0356f7f1ff06d093251.tar.gz
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 <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--webservice.c4
1 files changed, 2 insertions, 2 deletions
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;