### Class

# Rest ProxyCall

#### Description [src]

    class Rest.ProxyCall : GObject.Object
    {
      /* No available fields */
    }

`RestProxyCall` has no publicly available members.

#### Hierarchy

#### Ancestors

- GObject

#### Descendants

- RestOAuth2ProxyCall

#### Instance methods

###### rest_proxy_call_add_header

Add a header called `header` with the value `value` to the call. If a header with this name already exists, the new value will replace the old.

###### rest_proxy_call_add_headers

Add the specified header name and value pairs to the call. If a header already exists, the new value will replace the old.

###### rest_proxy_call_add_headers_from_valist

Add the specified header name and value pairs to the call. If a header already exists, the new value will replace the old.

###### rest_proxy_call_add_param

Add a query parameter called `param` with the string value `value` to the call. If a parameter with this name already exists, the new value will replace the old.

###### rest_proxy_call_add_param_full

Add a query parameter `param` to the call. If a parameter with this name already exists, the new value will replace the old.

###### rest_proxy_call_add_params

Add the specified parameter name and value pairs to the call. If a parameter already exists, the new value will replace the old.

###### rest_proxy_call_add_params_from_valist

Add the specified parameter name and value pairs to the call. If a parameter already exists, the new value will replace the old.

###### rest_proxy_call_cancel

Cancel this call. It may be too late to not actually send the message, but the callback will not be invoked.

###### rest_proxy_call_continuous

Asynchronously invoke `call` but expect a continuous stream of content. This means that the body data will not be accumulated and thus you cannot use rest_proxy_call_get_payload().

###### rest_proxy_call_get_function

Get the REST function that is going to be called on the proxy.

since: 0.7.92

###### rest_proxy_call_get_method

Get the HTTP method to use when making the call, for example GET or POST.

###### rest_proxy_call_get_params

Get the parameters as a `RestParams` of parameter names to values. The returned value is owned by the RestProxyCall instance and should not be freed by the caller.

###### rest_proxy_call_get_payload

Get the return payload.

###### rest_proxy_call_get_payload_length

Get the length of the return payload.

###### rest_proxy_call_get_response_headers

No description available.

###### rest_proxy_call_get_status_code

Get the HTTP status code for the call.

###### rest_proxy_call_get_status_message

Get the human-readable HTTP status message for the call.

###### rest_proxy_call_invoke_async

No description available.

###### rest_proxy_call_invoke_finish

No description available.

###### rest_proxy_call_lookup_header

Get the value of the header called `header`.

###### rest_proxy_call_lookup_param

Get the value of the parameter called `name`.

###### rest_proxy_call_lookup_response_header

Get the string value of the header `header` or `NULL` if that header is not present or there are no headers.

###### rest_proxy_call_remove_header

Remove the header named `header` from the call.

###### rest_proxy_call_remove_param

Remove the parameter named `name` from the call.

###### rest_proxy_call_serialize_params

Invoker for a virtual method to serialize the parameters for this `RestProxyCall`.

###### rest_proxy_call_set_function

Set the REST “function” to call on the proxy. This is appended to the URL, so that for example a proxy with the URL http://www.example.com/ and the function test would actually access the URL http://www.example.com/test.

###### rest_proxy_call_set_method

Set the HTTP method to use when making the call, for example GET or POST.

###### rest_proxy_call_sync

Synchronously invokes `call`. After this function has returned, `rest_proxy_call_get_payload()` will return the result of this call.

###### rest_proxy_call_upload

Asynchronously invoke `call` but expect to have the callback invoked every time a chunk of our request’s body is written.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### Rest.ProxyCall:proxy

No description available.

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct RestProxyCallClass {
      gboolean (* prepare) (
        RestProxyCall* call,
        GError** error
      );
      gboolean (* serialize_params) (
        RestProxyCall* call,
        gchar** content_type,
        gchar** content,
        gsize* content_len,
        GError** error
      );

    }

Class structure for `RestProxyCall` for subclasses to implement specialised behaviour.

###### Class members

`prepare: gboolean (* prepare) ( RestProxyCall* call, GError** error )`

  Virtual function called before making the request, This allows the call to be modified, for example to add a signature.

`serialize_params: gboolean (* serialize_params) ( RestProxyCall* call, gchar** content_type, gchar** content, gsize* content_len, GError** error )`

  Virtual function allowing custom serialization of the parameters, for example when the API doesn’t expect standard form content.

#### Virtual methods

###### Rest.ProxyCallClass.prepare

Virtual function called before making the request, This allows the call to be modified, for example to add a signature.

###### Rest.ProxyCallClass.serialize_params

Invoker for a virtual method to serialize the parameters for this `RestProxyCall`.