Function
RestParamnew_string
Declaration [src]
RestParam*
rest_param_new_string (
const char* name,
RestMemoryUse use,
const char* string
)
Description [src]
A convience constructor to create a RestParam
from a given UTF-8 string.
The resulting RestParam
will have a content type of “text/plain”.
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:
RestMemoryUse
The
RestMemoryUse
describing how the memory can be used. string
-
Type:
const char*
The parameter value.
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. |