add_soup_feature


Description:

[ Version ( since = "0.7.92" ) ]
public void add_soup_feature (SessionFeature feature)

This method can be used to add specific features to the Session objects that are used by librest for its HTTP connections.

For example, if one needs extensive control over the cookies which are used for the REST HTTP communication, it's possible to get full access to libsoup cookie API by using

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

Parameters:

this

The Proxy

feature

A SessionFeature




2022 vala-language.org