RestProxy

RestProxy

Synopsis

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

Object Hierarchy

  GObject
   +----RestProxy

Properties

  "binding-required"         gboolean              : Read / Write
  "url-format"               gchar*                : Read / Write
  "user-agent"               gchar*                : Read / Write

Description

A longer description goes here.

Details

RestProxy

typedef struct _RestProxy RestProxy;

RestProxy has no publicly available members.


RestProxyClass

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;

rest_proxy_new ()

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.

url_format :

the endpoint URL

binding_required :

whether the URL needs to be bound before calling

Returns :

A new RestProxy.

rest_proxy_bind ()

gboolean            rest_proxy_bind                     (RestProxy *proxy,
                                                         ...);

rest_proxy_new_call ()

RestProxyCall*      rest_proxy_new_call                 (RestProxy *proxy);

rest_proxy_simple_run ()

gboolean            rest_proxy_simple_run               (RestProxy *proxy,
                                                         gchar **payload,
                                                         goffset *len,
                                                         GError **error,
                                                         ...);

Property Details

The "binding-required" property

  "binding-required"         gboolean              : Read / Write

Whether the URL format requires binding.

Default value: FALSE


The "url-format" property

  "url-format"               gchar*                : Read / Write

Format string for the RESTful url.

Default value: NULL


The "user-agent" property

  "user-agent"               gchar*                : Read / Write

The User-Agent of the client.

Default value: NULL