Function
RestParamnew_full
Declaration [src]
RestParam*
rest_param_new_full (
const char* name,
RestMemoryUse use,
gconstpointer data,
gsize length,
const char* content_type,
const char* filename
)
Description [src]
Create a new RestParam called name with length bytes of data as the value. content_type is the type of the data as a MIME type, for example
“text/plain” for simple string parameters.
If the parameter is a file upload it can be passed as filename.
Parameters
name-
Type:
const char*The parameter name.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. use-
Type:
RestMemoryUseThe
RestMemoryUsedescribing how the memory can be used. data-
Type: An array of
guint8A pointer to the start of the data.
The length of the array is specified in the lengthargument. length-
Type:
gsizeThe length of the data.
content_type-
Type:
const char*The content type of the data.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. filename-
Type:
const char*The original filename, or
NULL.The argument can be NULL.The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string.
Return value
Type: RestParam
A new RestParam.
| The caller of the function takes ownership of the data, and is responsible for freeing it. |