![]() |
![]() |
![]() |
Rest Reference Manual | ![]() |
---|---|---|---|---|
RestProxy; RestProxyClass; RestProxy* rest_proxy_new (const gchar *url_format, gboolean binding_required); gboolean rest_proxy_bind (RestProxy *proxy, ...); RestProxyCall* rest_proxy_new_call (RestProxy *proxy); gboolean rest_proxy_simple_run (RestProxy *proxy, gchar **payload, goffset *len, GError **error, ...);
"binding-required" gboolean : Read / Write "url-format" gchar* : Read / Write "user-agent" gchar* : Read / Write
typedef struct { GObjectClass parent_class; gboolean (*bind_valist)(RestProxy *proxy, va_list params); RestProxyCall *(*new_call)(RestProxy *proxy); gboolean (*simple_run_valist)(RestProxy *proxy, gchar **payload, goffset *len, GError **error, va_list params); } RestProxyClass;
RestProxy* rest_proxy_new (const gchar *url_format, gboolean binding_required);
Create a new RestProxy 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.
|
the endpoint URL |
|
whether the URL needs to be bound before calling |
Returns : |
A new RestProxy. |
"binding-required"
property"binding-required" gboolean : Read / Write
Whether the URL format requires binding.
Default value: FALSE
"url-format"
property"url-format" gchar* : Read / Write
Format string for the RESTful url.
Default value: NULL
"user-agent"
property"user-agent" gchar* : Read / Write
The User-Agent of the client.
Default value: NULL