Rest.Proxy¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
Whether the URL format requires binding |
||
r/w/co |
Whether to disable cookie support |
||
r/w |
The password for authentication |
||
r/w |
File containing SSL CA certificates. |
||
r/w |
Whether certificate errors should be considered a connection error |
||
r/w |
Format string for the RESTful url |
||
r/w |
The User-Agent of the client |
||
r/w |
The username for authentication |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Rest.Proxy(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Rest.Proxy
has no publicly available members.- classmethod new(url_format, binding_required)¶
- Parameters:
- Returns:
A new
Rest.Proxy
.- Return type:
Create a new
Rest.Proxy
for the specified endpoint url_format, using the “GET” method.Set binding_required to
True
if the URL contains string formatting operations (for example “http://foo.com/% s”. These must be expanded using rest_proxy_bind() before invoking the proxy.
- classmethod new_with_authentication(url_format, binding_required, username, password)¶
- Parameters:
- Returns:
A new
Rest.Proxy
.- Return type:
Create a new
Rest.Proxy
for the specified endpoint url_format, using the “GET” method.Set binding_required to
True
if the URL contains string formatting operations (for example “http://foo.com/% s”. These must be expanded using rest_proxy_bind() before invoking the proxy.
- add_soup_feature(feature)¶
- Parameters:
feature (
Soup.SessionFeature
) – ASoup.SessionFeature
This method can be used to add specific features to the
Soup.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 usingRestProxy *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);
New in version 0.7.92.
- new_call()¶
- Returns:
a new
Rest.ProxyCall
.- Return type:
Create a new
Rest.ProxyCall
for making a call to the web service. This call is one-shot and should not be re-used for making multiple calls.
- do_authenticate(auth, retrying) virtual¶
- Parameters:
auth (
Rest.ProxyAuth
) –retrying (
bool
) –
- Return type:
- do_new_call() virtual¶
- Returns:
a new
Rest.ProxyCall
.- Return type:
Create a new
Rest.ProxyCall
for making a call to the web service. This call is one-shot and should not be re-used for making multiple calls.
Property Details¶
- Rest.Proxy.props.binding_required¶
-
Whether the URL format requires binding
- Rest.Proxy.props.disable_cookies¶
- Name:
disable-cookies
- Type:
- Default Value:
- Flags:
Whether to disable cookie support
- Rest.Proxy.props.password¶
-
The password for authentication
- Rest.Proxy.props.ssl_ca_file¶
-
File containing SSL CA certificates.
- Rest.Proxy.props.ssl_strict¶
-
Whether certificate errors should be considered a connection error
- Rest.Proxy.props.url_format¶
-
Format string for the RESTful url
- Rest.Proxy.props.user_agent¶
-
The User-Agent of the client