Qore RestClient Module Reference 1.9.1
Loading...
Searching...
No Matches
RestClient::RestClient Class Reference

this class provides the REST client API More...

#include <RestClient.qm.dox.h>

Inheritance diagram for RestClient::RestClient:
[legend]

Public Attributes

const Accept = AcceptList.join(",")
 Accept header value.
 
const AcceptList = ...
 Accept header list.
 
const AcceptMap = map {$1: True}
 Map of acceptable Mime types.
 
const CompressionThreshold = 1024
 default threadhold for data compressions; transfers smaller than this size will not be compressed
 
const DataSerializationOptions
 Data serialization options; this is a hash to simulate a set of strings. More...
 
const DataSerializationSupport
 Data serialization support mapping codes to MIME types and de/serialization functions.
 
const DefaultHeaders
 default HTTP headers (Content-Type is added before sending)
 
const EncodingSupport
 Send content encoding options. More...
 
const Version = "1.7"
 RestClient Version.
 
const VersionString = sprintf("Qore-RestClient/%s", RestClient::Version)
 RestClient Version String.
 

Detailed Description

this class provides the REST client API

Member Data Documentation

◆ DataSerializationOptions

const RestClient::RestClient::DataSerializationOptions
Initial value:
= {
"auto": True,
%ifndef NoJson
"json": True,
%endif
%ifndef NoYaml
"yaml": True,
%endif
%ifndef NoXml
"rawxml": True,
"xml": True,
%endif
"url": True,
"text": True,
"bin": True,
}

Data serialization options; this is a hash to simulate a set of strings.

Data serialization options are as follows:

  • "auto": prefers in this order: json, yaml, rawxml, xml, url, and text
  • "bin": for binary message bodies without data serialization
  • "json": use only JSON serialization
  • "rawxml": use raw XML serialization
  • "text": use only plain text. No serialization is used.
  • "url": for URL-encoded message bodies
  • "xml": use only XML-RPC serialization
  • "yaml": use only YAML serialization

◆ EncodingSupport

const RestClient::RestClient::EncodingSupport
Initial value:
= {
"gzip": {
"ce": "gzip",
"func": \gzip(),
},
"bzip2": {
"ce": "bzip2",
"func": \bzip2(),
},
"deflate": {
"ce": "deflate",
"func": \compress(),
},
"identity": {
"ce": NOTHING,
},
}

Send content encoding options.

Send content encoding options are as follows:

  • "bzip": use bzip2 compression
  • "gzip": use gzip compression
  • "deflate": use deflate compression
  • "identity": use no content encoding