Param
Object Hierarchy:
Description:
[ CCode ( ref_function = "rest_param_ref" , type_id = "rest_param_get_type ()" , unref_function = "rest_param_unref" ) ]
[ Compact ]
public class Param
Content:
Creation methods:
- public Param.full (string name, MemoryUse use, uint8[] data, string content_type, string filename)
Create a new Param called name
with
data.length
bytes of data
as the value.
- public Param.string (string name, MemoryUse use, string string)
A convience constructor to create a Param from a
given UTF-8 string.
- public Param.with_owner (string name, uint8[] data, string content_type, string? filename, void* owner, DestroyNotify? owner_dnotify)
Create a new Param called name
with
data.length
bytes of data
as the value.
Methods:
- public unowned Param @ref ()
Increase the reference count on this.
- public void* get_content ()
Get the content of this.
- public size_t get_content_length ()
Get the length of the content of this.
- public unowned string get_content_type ()
Get the MIME type of the parameter.
- public unowned string get_file_name ()
Get the original file name of the parameter, if one is available.
- public unowned string get_name ()
Get the name of the parameter.
- public bool is_string ()
Determine if the parameter is a string value, i.e. the content type is
"text/plain".
- public void unref ()
Decrease the reference count on this,
destroying it if the reference count reaches 0.