summaryrefslogtreecommitdiff
path: root/rest/rest-proxy.h
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2013-12-11 15:27:23 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2014-08-25 18:42:07 +0200
commit68d90e9e315d279aebe04d6b1177e57c075b8f72 (patch)
tree82dfa91cc852f2664e413fe5ba15f016fd32428d /rest/rest-proxy.h
parentc66b6df501a0b40210ab2f23882ce3f57fdb1f5f (diff)
downloadlibrest-68d90e9e315d279aebe04d6b1177e57c075b8f72.tar.gz
Add rest_proxy_add_soup_feature()
This function can be helpful if one wants more control over libsoup features than what librest simple API provide. For example, to get full access to libsoup cookie API (say to be able to add arbitrary cookies to the soup session), one can do: RestProxy *proxy = g_object_new(REST_TYPE_PROXY, "url-format", url, "disable-cookies", TRUE, NULL); SoupSessionFeature *cookie_jar = SOUP_SESSION_FEATURE(soup_cookie_jar_new ()); rest_proxy_add_soup_feature(proxy, cookie_jar); It's then possible to use all the soup_cookie_* methods to deal with cookies. https://bugzilla.gnome.org/show_bug.cgi?id=728340
Diffstat (limited to 'rest/rest-proxy.h')
-rw-r--r--rest/rest-proxy.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/rest/rest-proxy.h b/rest/rest-proxy.h
index 8c3dd68..d341403 100644
--- a/rest/rest-proxy.h
+++ b/rest/rest-proxy.h
@@ -24,6 +24,7 @@
#define _REST_PROXY
#include <glib-object.h>
+#include <libsoup/soup-session-feature.h>
#include <rest/rest-proxy-auth.h>
#include <rest/rest-proxy-call.h>
@@ -196,6 +197,9 @@ void rest_proxy_set_user_agent (RestProxy *proxy, const char *user_agent);
const gchar *rest_proxy_get_user_agent (RestProxy *proxy);
+void rest_proxy_add_soup_feature (RestProxy *proxy,
+ SoupSessionFeature *feature);
+
RestProxyCall *rest_proxy_new_call (RestProxy *proxy);
G_GNUC_NULL_TERMINATED