Declaration [src]

soup_form_encode (
  const char* first_field,

Description [src]

Encodes the given field names and values into a value of type “application/x-www-form-urlencoded”.

Encodes as defined in the HTML 4.01 spec.

This method requires you to know the names of the form fields (or at the very least, the total number of fields) at compile time; for working with dynamic forms, use soup_form_encode_hash() or soup_form_encode_datalist().

See also: soup_message_new_from_encoded_form().

This function is not directly available to language bindings.



Type: const char*

Name of the first form field.

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


Value of first_field, followed by additional field names and values, terminated by NULL.

Return value

Type: char*

The encoded form.

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