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 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 RestMemoryUse
 

The RestMemoryUse describing how the memory can be used.

string 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

Returns: RestParam
 

A new RestParam.

 The caller of the function takes ownership of the data, and is responsible for freeing it.