Constructor

SoupMessagenew_from_encoded_form

Declaration [src]

SoupMessage*
soup_message_new_from_encoded_form (
  const char* method,
  const char* uri_string,
  char* encoded_form
)

Description [src]

Creates a new SoupMessage and sets it up to send the given encoded_form to uri via method. If method is “GET”, it will include the form data into uris query field, and if method is “POST” or “PUT”, it will be set as request body.

This function takes the ownership of encoded_form, that will be released with g_free() when no longer in use. See also soup_form_encode(), soup_form_encode_hash() and soup_form_encode_datalist().

Parameters

method

Type: const char*

The HTTP method for the created request (GET, POST or PUT)

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
uri_string

Type: const char*

The destination endpoint (as a string)

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
encoded_form

Type: char*

A encoded form.

The called function takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.

Return value

Type: SoupMessage

The new SoupMessage, or NULL if uri_string could not be parsed or method is not “GET, “POST” or “PUT

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be NULL.