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>
This commit is contained in:
Lubomir I. Ivanov 2013-01-27 20:31:36 +02:00 committed by Dirk Hohndel
parent a61877d1d4
commit 3aa41635f0

View file

@ -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;