94 namespace RestClient {
105 "out": \makeJSONString(),
113 "out": \makeXMLRPCValueString(),
118 const DeserializeYaml = (
122 const DeserializeXmlRpc = (
124 "in": \parseXMLRPCValue(),
298 hash get(
string path, any body, *reference info, *
hash hdr);
320 hash put(
string path, any body, *reference info, *
hash hdr);
342 hash post(
string path, any body, *reference info, *
hash hdr);
364 hash del(
string path, any body, *reference info, *
hash hdr);
368 private nothing
prepareMsg(reference body, reference hdr,
string ct =
"Content-Type");
397 hash doRequest(
string m,
string path, any body, *reference info, *softbool decode_errors, *
hash hdr);
this class provides the REST client API
Definition: RestClient.qm.dox.h:97
const Version
RestClient Version.
Definition: RestClient.qm.dox.h:150
string sprintf(string fmt,...)
const AcceptList
Accept header list.
Definition: RestClient.qm.dox.h:140
const DataSerializationSupport
Data serialization support mapping codes to MIME types and de/serialization functions.
Definition: RestClient.qm.dox.h:102
hash del(string path, any body, *reference info, *hash hdr)
sends an HTTP DELETE request to the REST server and returns the response
setSendEncoding(string enc="auto")
change the serialization option for the object; see DataSerializationOptions for valid options ...
const DefaultHeaders
default HTTP headers (Content-Type is added before sending)
Definition: RestClient.qm.dox.h:156
hash put(string path, any body, *reference info, *hash hdr)
sends an HTTP PUT request to the REST server and returns the response
const DataDeserializationSupport
Data deserialization support MIME types to codes and de/serialization functions.
Definition: RestClient.qm.dox.h:128
private nothing prepareMsg(reference body, reference hdr, string ct="Content-Type")
sets up the Content-Type header and encodes any body for sending
const DataSerializationOptions
Data serialization options; this is a hash to simulate a set of strings.
Definition: RestClient.qm.dox.h:168
const Accept
Accept header value.
Definition: RestClient.qm.dox.h:147
const VersionString
RestClient Version String.
Definition: RestClient.qm.dox.h:153
string getSerialization()
returns the current data serialization format currently in effect for the object (see DataSerializati...
binary bzip2(binary bin, softint level=BZ2_DEFAULT_COMPRESSION)
decodeResponse(reference h, *reference info)
decodes the response
binary gzip(string str, int level=Z_DEFAULT_COMPRESSION)
hash post(string path, any body, *reference info, *hash hdr)
sends an HTTP POST request to the REST server and returns the response
private nothing preparePath(reference path)
sets up the path for the HTTP request URI
hash doRequest(string m, string path, any body, *reference info, *softbool decode_errors, *hash hdr)
sends an HTTP request to the REST server and returns the response
setSerialization(string data="auto")
change the serialization option for the object; see DataSerializationOptions for valid options ...
const EncodingSupport
Send content encoding options.
Definition: RestClient.qm.dox.h:181
binary compress(string str, int level=Z_DEFAULT_COMPRESSION)