mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
a61877d1d4
commit
3aa41635f0
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue