Qore RestClient Module Reference
1.3
|
The RestClient module provides an API for calling REST services.
To use this module, use "%requires RestClient"
in your code.
All the public symbols in the module are defined in the RestClient namespace.
The main classes are:
The RestClient class can support three methods of data serialization:
"json"
: using the "json"
module; messages bodies are encoded using JSON"yaml"
: using the "yaml"
module; message bodies are encoded using YAML"xml"
: using the "xml"
module; message bodies are encoded using XML-RPC value encodingIf none of the above modules can be loaded by the RestClient module, then the RestClient module will fail to initialize.
For maximum compatibility with other REST solutions, the "json"
encoding method is the default when no other encoding method is chosen and the "json"
module is available.
See example file "rest"
in the examples directory for a more detailed example using this module
"content_encoding"
option for the RestClient constructor"gzip"
the default content encoding"Content-Type"
header in requests"Accept"
header in requests