Qore yaml Module 1.0.0
|
this class extends RestClient with support for the DataStream protocol More...
#include <DataStreamClient.qm.dox.h>
Inherits RestClient::RestClient.
Public Member Methods | |
constructor (*hash< auto > opts, *softbool do_not_connect) | |
calls the base class RestClient constructor and optionally connects to the REST server | |
recvDataStream (code recv_callback, code eod_callback, string method, string path, auto body, timeout timeout_ms=0, *reference< hash< auto > > info, *hash< auto > hdr) | |
sends an HTTP request to an HTTP REST server supporting the DataStream protocol and returns the decoded and deserialized response in the given callback as each HTTP chunk is received | |
recvDataStream (DataStreamRecvMessage dsm, string method, string path, auto body, timeout timeout_ms=0, *reference< hash< auto > > info, *hash< auto > hdr) | |
sends an HTTP request to an HTTP REST server supporting the DataStream protocol and returns the decoded and deserialized response in the given callback as each HTTP chunk is received | |
hash< auto > | sendDataStream (code scb, string method, string path, timeout timeout_ms=0, *reference< hash< auto > > info, *hash< auto > hdr) |
Sends an HTTP request to an HTTP REST server using the DataStream protocol. | |
hash< auto > | sendDataStream (DataStreamSendMessage dsm, string method, string path, timeout timeout_ms=0, *reference< hash< auto > > info, *hash< auto > hdr) |
Sends an HTTP request to an HTTP REST server supporting the DataStream protocol with the specified method and chunked message body as given by a send callback and returns the deserialized body and response headers received as a response. | |
sendRecvDataStream (code scb, code recv_callback, code eod_callback, string method, string path, timeout timeout_ms=0, *reference< hash< auto > > info, *hash< auto > hdr) | |
Sends an HTTP request an HTTP REST server supporting the DataStream protocol with the specified method and serialized and encoded chunked message body as given by a send callback; decoded and deserialized data received from the HTTP server are returned through a receive callback. | |
sendRecvDataStream (DataStreamMessage dsm, string method, string path, timeout timeout_ms=0, *reference< hash< auto > > info, *hash< auto > hdr) | |
Sends an HTTP request an HTTP REST server supporting the DataStream protocol with the specified method and serialized and encoded chunked message body as given by a send callback; decoded and deserialized data received from the HTTP server are returned through a receive callback. | |
hash< auto > | sendRawStream (code scb, string method, *string path, timeout timeout_ms=0, *reference< hash< auto > > info, *hash< auto > hdr) |
send raw chunked data to the client and expect a YAML-formatted response | |
hash< auto > | getRawStream (code recv_callback, string method, *string path, auto body, timeout timeout_ms=0, *reference< hash< auto > > info, *hash< auto > hdr) |
receives raw chunked data using the given closure and returns any headers received | |
addDefaultHeaders (hash< auto > h) | |
adds default headers to each request; these headers will be sent in all requests but can be overridden in requests as well | |
setContentEncoding (string enc='auto') | |
sets the request and desired response encoding for the object; see EncodingSupport for valid options | |
hash< auto > | sendAndDecodeResponse (*data body, string m, string path, hash< auto > hdr, *reference< hash< auto > > info, *softbool decode_errors) |
sends the outgoing HTTP message and recodes the response to data | |
Public Attributes | |
const | Version = "1.1" |
DataStreamClient Version. | |
const | VersionString = sprintf("Qore-DataStreamClient/%s", DataStreamClient::Version) |
DataStreamClient Version String. | |
const | DefaultHeaders = ... |
default HTTP headers | |
this class extends RestClient with support for the DataStream protocol
DataStreamClient::DataStreamClient::addDefaultHeaders | ( | hash< auto > | h | ) |
adds default headers to each request; these headers will be sent in all requests but can be overridden in requests as well
h | a hash of headers to add to the default headers to send on each request |
DataStreamClient::DataStreamClient::constructor | ( | *hash< auto > | opts, |
*softbool | do_not_connect | ||
) |
calls the base class RestClient constructor and optionally connects to the REST server
opts | valid options are:
|
do_not_connect | if False (the default), then a connection will be immediately established to the remote server |
RESTCLIENT-ERROR | invalid option passed to constructor, unsupported data serialization, etc |
data
argument to RestClient::constructor() is set to "yaml"
automatically hash< auto > DataStreamClient::DataStreamClient::getRawStream | ( | code | recv_callback, |
string | method, | ||
*string | path, | ||
auto | body, | ||
timeout | timeout_ms = 0 , |
||
*reference< hash< auto > > | info, | ||
*hash< auto > | hdr | ||
) |
receives raw chunked data using the given closure and returns any headers received
Any message body will be serialized as YAML and the "Content-Type"
header will be set to "application/x-yaml"
.
recv_callback | The receive callback for the data received; first this method is called with a hash of the message headers, and then with any message body; if a chunked HTTP message is received, then the callback is called once for each chunk; when the message has been received, then the receive callback is called with a hash representing any trailer data received in a chunked transfer or nothing if the data was received in a normal message body or if there was no trailer data in a chunked transfer. The argument to this callback is always a hash; data calls have the following keys:
|
method | The name of the HTTP method ("GET" , "POST" , "HEAD" , "OPTIONS" , "PUT" , "DELETE" , "TRACE" , or "CONNECT" ). Additional methods can be added in the constructor as a additional_methods option. |
path | The path for the message (i.e. "/path/resource?method¶m=value" ) |
body | an optional message body to be included in the request; if a value for this parameter is passed to the method, then the body will be serialized with YAML serialization |
timeout_ms | the timeout in milliseconds for the socket I/O operations; 0 means use the default timeout value |
info | An optional reference to an lvalue that will be used as an output variable giving a hash of request headers and other information about the HTTP request. |
hdr | An optional hash of headers to include in the message. |
HTTP-CLIENT-METHOD-ERROR | invalid/unknown HTTP method passed |
HTTP-CLIENT-REDIRECT-ERROR | invalid redirect location given by remote |
HTTP-CLIENT-MAXIMUM-REDIRECTS-EXCEEDED | maximum redirect count exceeded |
HTTP-CLIENT-RECEIVE-ERROR | unknown content encoding received or status error communicating with HTTP server (status code < 100 or > 299); in case of a status error the "arg" key of the exception hash will be set to a hash equal to the normal return value of this method including a "status_code" key (giving the status code) and a "body" key (giving the message body returned by the server) |
ENCODING-CONVERSION-ERROR | the given string could not be converted to the socket's character encoding |
SOCKET-SEND-ERROR | There was an error sending the data |
SOCKET-CLOSED | The remote end closed the connection |
SOCKET-RECV-ERROR | There was an error receiving the data |
SOCKET-TIMEOUT | Data transmission or reception for a single send() or recv() action exceeded the timeout period |
SOCKET-SSL-ERROR | There was an SSL error while reading data from the socket |
SOCKET-HTTP-ERROR | Invalid HTTP data was received |
DataStreamClient::DataStreamClient::recvDataStream | ( | code | recv_callback, |
code | eod_callback, | ||
string | method, | ||
string | path, | ||
auto | body, | ||
timeout | timeout_ms = 0 , |
||
*reference< hash< auto > > | info, | ||
*hash< auto > | hdr | ||
) |
sends an HTTP request to an HTTP REST server supporting the DataStream protocol and returns the decoded and deserialized response in the given callback as each HTTP chunk is received
recv_callback | The receive callback for the data received; the argument passed to this callback is the decoded and deserialized data in the message |
eod_callback | When the chunked transfer has completed; this must accept a *string argument; this is called with no arguments once all data has been received if the sender does not report a send error, otherwise it's called with a single string giving the send error reported by the sending side in the DataStream-Error trailer record |
method | the HTTP method to be used; case is ignored (if not a valid method an HTTP-CLIENT-METHOD-ERROR exception is raised) |
path | the URI path to add (will be appended to any root path given in the constructor) |
body | an optional message body to be included in the request; if a value for this parameter is passed to the method, then the body will be serialized with YAML serialization |
timeout_ms | the timeout in milliseconds for the socket I/O operations; 0 means use the default timeout value |
info | an optional reference to a hash that will be used as an output variable giving a hash of request headers and other information about the HTTP request |
hdr | any headers to be sent with the request; headers here will override default headers for the object as well |
HTTP-CLIENT-METHOD-ERROR | invalid/unknown HTTP method passed |
HTTP-CLIENT-REDIRECT-ERROR | invalid redirect location given by remote |
HTTP-CLIENT-MAXIMUM-REDIRECTS-EXCEEDED | maximum redirect count exceeded |
HTTP-CLIENT-RECEIVE-ERROR | unknown content encoding received or status error communicating with HTTP server (status code < 100 or > 299); in case of a status error the "arg" key of the exception hash will be set to a hash equal to the normal return value of this method including a "status_code" key (giving the status code) and a "body" key (giving the message body returned by the server) |
ENCODING-CONVERSION-ERROR | the given string could not be converted to the socket's character encoding |
SOCKET-SEND-ERROR | There was an error sending the data |
SOCKET-CLOSED | The remote end closed the connection |
SOCKET-RECV-ERROR | There was an error receiving the data |
SOCKET-TIMEOUT | Data transmission or reception for a single send() or recv() action exceeded the timeout period |
SOCKET-SSL-ERROR | There was an SSL error while reading data from the socket |
SOCKET-HTTP-ERROR | Invalid HTTP data was received |
DESERIALIZATION-ERROR | the response body could not be deserialized (unknown Content-Type or invalid serialization) |
DataStreamClient::DataStreamClient::recvDataStream | ( | DataStreamRecvMessage | dsm, |
string | method, | ||
string | path, | ||
auto | body, | ||
timeout | timeout_ms = 0 , |
||
*reference< hash< auto > > | info, | ||
*hash< auto > | hdr | ||
) |
sends an HTTP request to an HTTP REST server supporting the DataStream protocol and returns the decoded and deserialized response in the given callback as each HTTP chunk is received
dsm | the DataStreamRecvMessage object providing the DataStreamRecvMessage::recvData() and DataStreamRecvMessage::recvDataDone() methods to be used as callbacks |
method | the HTTP method to be used; case is ignored (if not a valid method an HTTP-CLIENT-METHOD-ERROR exception is raised) |
path | the URI path to add (will be appended to any root path given in the constructor) |
body | an optional message body to be included in the request; if a value for this parameter is passed to the method, then the body will be serialized with YAML serialization |
timeout_ms | the timeout in milliseconds for the socket I/O operations; 0 means use the default timeout value |
info | an optional reference to a hash that will be used as an output variable giving a hash of request headers and other information about the HTTP request |
hdr | any headers to be sent with the request; headers here will override default headers for the object as well |
HTTP-CLIENT-METHOD-ERROR | invalid/unknown HTTP method passed |
HTTP-CLIENT-REDIRECT-ERROR | invalid redirect location given by remote |
HTTP-CLIENT-MAXIMUM-REDIRECTS-EXCEEDED | maximum redirect count exceeded |
HTTP-CLIENT-RECEIVE-ERROR | unknown content encoding received or status error communicating with HTTP server (status code < 100 or > 299); in case of a status error the "arg" key of the exception hash will be set to a hash equal to the normal return value of this method including a "status_code" key (giving the status code) and a "body" key (giving the message body returned by the server) |
ENCODING-CONVERSION-ERROR | the given string could not be converted to the socket's character encoding |
SOCKET-SEND-ERROR | There was an error sending the data |
SOCKET-CLOSED | The remote end closed the connection |
SOCKET-RECV-ERROR | There was an error receiving the data |
SOCKET-TIMEOUT | Data transmission or reception for a single send() or recv() action exceeded the timeout period |
SOCKET-SSL-ERROR | There was an SSL error while reading data from the socket |
SOCKET-HTTP-ERROR | Invalid HTTP data was received |
DESERIALIZATION-ERROR | the response body could not be deserialized (unknown Content-Type or invalid serialization) |
hash< auto > DataStreamClient::DataStreamClient::sendDataStream | ( | code | scb, |
string | method, | ||
string | path, | ||
timeout | timeout_ms = 0 , |
||
*reference< hash< auto > > | info, | ||
*hash< auto > | hdr | ||
) |
Sends an HTTP request to an HTTP REST server using the DataStream protocol.
The message is sent using the DataStream protocol with the specified method and chunked message body as given by a send callback and returns the deserialized body and response headers received as a response.
If a connection has not already been established, an internal call to HTTPClient::connect() will be made before sending the message.
scb | The callback giving the chunked HTTP data to send; the data returned by this callback will be serialized to YAML and send via the DataStream protocol to the remote HTTP REST server in HTTP chunked format; when all data has been send then this callback should return nothing, which will close the chunked message and terminate the request |
method | The name of the HTTP method ("GET" , "POST" , "HEAD" , "OPTIONS" , "PUT" , "DELETE" , "TRACE" , or "CONNECT" ). |
path | the URI path to add (will be appended to any root path given in the constructor) |
timeout_ms | the timeout in milliseconds for the socket I/O operations; 0 means use the default timeout value |
info | An optional reference to an lvalue that will be used as an output variable giving a hash of request headers and other information about the HTTP request |
hdr | any headers to be sent with the request; headers here will override default headers for the object as well |
"body"
key, and the HTTP status will be assigned to the "status_code"
key. In the case of a chunked DataStream response, the "body"
key will be assigned a list where each list element is the data value of the respective DataStream chunkHTTP-CLIENT-METHOD-ERROR | invalid/unknown HTTP method passed |
HTTP-CLIENT-REDIRECT-ERROR | invalid redirect location given by remote |
HTTP-CLIENT-MAXIMUM-REDIRECTS-EXCEEDED | maximum redirect count exceeded |
HTTP-CLIENT-RECEIVE-ERROR | unknown content encoding received or status error communicating with HTTP server (status code < 100 or > 299); in case of a status error the "arg" key of the exception hash will be set to a hash equal to the normal return value of this method including a "status_code" key (giving the status code) and a "body" key (giving the message body returned by the server) |
ENCODING-CONVERSION-ERROR | the given string could not be converted to the socket's character encoding |
SOCKET-SEND-ERROR | There was an error sending the data |
SOCKET-CLOSED | The remote end closed the connection |
SOCKET-RECV-ERROR | There was an error receiving the data |
SOCKET-TIMEOUT | Data transmission or reception for a single send() or recv() action exceeded the timeout period |
SOCKET-SSL-ERROR | There was an SSL error while reading data from the socket |
SOCKET-HTTP-ERROR | Invalid HTTP data was received |
"Transfer-Encoding: chunked"
header is automatically set with this method if no "Transfer-Encoding"
header is already present"body"
key as a list where each list element is the data value of the respective DataStream chunk"body"
key will be decoded and deserialized data hash< auto > DataStreamClient::DataStreamClient::sendDataStream | ( | DataStreamSendMessage | dsm, |
string | method, | ||
string | path, | ||
timeout | timeout_ms = 0 , |
||
*reference< hash< auto > > | info, | ||
*hash< auto > | hdr | ||
) |
Sends an HTTP request to an HTTP REST server supporting the DataStream protocol with the specified method and chunked message body as given by a send callback and returns the deserialized body and response headers received as a response.
If a connection has not already been established, an internal call to HTTPClient::connect() will be made before sending the message
dsm | the DataStreamSendMessage object providing the DataStreamSendMessage::sendData() method to be used as a callback |
method | The name of the HTTP method ("GET" , "POST" , "HEAD" , "OPTIONS" , "PUT" , "DELETE" , "TRACE" , or "CONNECT" ). |
path | the URI path to add (will be appended to any root path given in the constructor) |
timeout_ms | the timeout in milliseconds for the socket I/O operations; 0 means use the default timeout value |
info | An optional reference to an lvalue that will be used as an output variable giving a hash of request headers and other information about the HTTP request |
hdr | any headers to be sent with the request; headers here will override default headers for the object as well |
"body"
key, and the HTTP status will be assigned to the "status_code"
key. In the case of a chunked DataStream response, the "body"
key will be assigned a list where each list element is the data value of the respective DataStream chunkHTTP-CLIENT-METHOD-ERROR | invalid/unknown HTTP method passed |
HTTP-CLIENT-REDIRECT-ERROR | invalid redirect location given by remote |
HTTP-CLIENT-MAXIMUM-REDIRECTS-EXCEEDED | maximum redirect count exceeded |
HTTP-CLIENT-RECEIVE-ERROR | unknown content encoding received or status error communicating with HTTP server (status code < 100 or > 299); in case of a status error the "arg" key of the exception hash will be set to a hash equal to the normal return value of this method including a "status_code" key (giving the status code) and a "body" key (giving the message body returned by the server) |
ENCODING-CONVERSION-ERROR | the given string could not be converted to the socket's character encoding |
SOCKET-SEND-ERROR | There was an error sending the data |
SOCKET-CLOSED | The remote end closed the connection |
SOCKET-RECV-ERROR | There was an error receiving the data |
SOCKET-TIMEOUT | Data transmission or reception for a single send() or recv() action exceeded the timeout period |
SOCKET-SSL-ERROR | There was an SSL error while reading data from the socket |
SOCKET-HTTP-ERROR | Invalid HTTP data was received |
"Transfer-Encoding: chunked"
header is automatically set with this method if no "Transfer-Encoding"
header is already present"body"
key as a list where each list element is the data value of the respective DataStream chunk"body"
key will be decoded and deserialized data hash< auto > DataStreamClient::DataStreamClient::sendRawStream | ( | code | scb, |
string | method, | ||
*string | path, | ||
timeout | timeout_ms = 0 , |
||
*reference< hash< auto > > | info, | ||
*hash< auto > | hdr | ||
) |
send raw chunked data to the client and expect a YAML-formatted response
The request will be made with the "Accept"
header set to "application/x-yaml"
; replies are expected to be YAML-serialized data. Note that the "body"
key in the return value will contain the deserialized YAML payload as Qore data.
scb | The callback giving the chunked HTTP data to send; this callback must return either a string or a binary value each time it is called to give the chunked data to send; when all data has been sent, then a hash of message trailers can be sent or simply nothing which will close the chunked message |
method | The name of the HTTP method ("GET" , "POST" , "HEAD" , "OPTIONS" , "PUT" , "DELETE" , "TRACE" , or "CONNECT" ). |
path | The path for the message (i.e. "/path/resource?method¶m=value" ) |
timeout_ms | the timeout in milliseconds for the socket I/O operations; 0 means use the default timeout value |
info | An optional reference to an lvalue that will be used as an output variable giving a hash of request headers and other information about the HTTP request. |
hdr | any headers to be sent with the request; headers here will override default headers for the object as well |
"body"
key and the HTTP status will be assigned to the "status_code"
key.HTTP-CLIENT-METHOD-ERROR | invalid/unknown HTTP method passed |
HTTP-CLIENT-REDIRECT-ERROR | invalid redirect location given by remote |
HTTP-CLIENT-MAXIMUM-REDIRECTS-EXCEEDED | maximum redirect count exceeded |
HTTP-CLIENT-RECEIVE-ERROR | unknown content encoding received or status error communicating with HTTP server (status code < 100 or > 299); in case of a status error the "arg" key of the exception hash will be set to a hash equal to the normal return value of this method including a "status_code" key (giving the status code) and a "body" key (giving the message body returned by the server) |
ENCODING-CONVERSION-ERROR | the given string could not be converted to the socket's character encoding |
SOCKET-SEND-ERROR | There was an error sending the data |
SOCKET-CLOSED | The remote end closed the connection |
SOCKET-RECV-ERROR | There was an error receiving the data |
SOCKET-TIMEOUT | Data transmission or reception for a single send() or recv() action exceeded the timeout period |
SOCKET-SSL-ERROR | There was an SSL error while reading data from the socket |
SOCKET-HTTP-ERROR | Invalid HTTP data was received |
DataStreamClient::DataStreamClient::sendRecvDataStream | ( | code | scb, |
code | recv_callback, | ||
code | eod_callback, | ||
string | method, | ||
string | path, | ||
timeout | timeout_ms = 0 , |
||
*reference< hash< auto > > | info, | ||
*hash< auto > | hdr | ||
) |
Sends an HTTP request an HTTP REST server supporting the DataStream protocol with the specified method and serialized and encoded chunked message body as given by a send callback; decoded and deserialized data received from the HTTP server are returned through a receive callback.
This method is useful for sending streaming data in the request and where streaming data is also expected in the response.
If a connection has not already been established, an internal call to HTTPClient::connect() will be made before sending the message
scb | The callback giving the chunked HTTP data to send; the data returned by this callback will be serialized to YAML and send via the DataStream protocol to the remote HTTP REST server in HTTP chunked format; when all data has been send then this callback should return nothing, which will close the chunked message and terminate the request |
recv_callback | The receive callback for the data received; the argument passed to this callback is the decoded and deserialized data in the message |
eod_callback | When the chunked transfer has completed; this must accept a *string argument; this is called with no arguments once all data has been received if the sender does not report a send error, otherwise it's called with a single string giving the send error reported by the sending side in the DataStream-Error trailer record |
method | The name of the HTTP method ("GET" , "POST" , "HEAD" , "OPTIONS" , "PUT" , "DELETE" , "TRACE" , or "CONNECT" ). |
path | The path for the message (i.e. "/path/resource?method¶m=value" ) |
timeout_ms | the timeout in milliseconds for the socket I/O operations; 0 means use the default timeout value |
info | An optional reference to an lvalue that will be used as an output variable giving a hash of request headers and other information about the HTTP request. |
hdr | any headers to be sent with the request; headers here will override default headers for the object as well |
HTTP-CLIENT-METHOD-ERROR | invalid/unknown HTTP method passed |
HTTP-CLIENT-REDIRECT-ERROR | invalid redirect location given by remote |
HTTP-CLIENT-MAXIMUM-REDIRECTS-EXCEEDED | maximum redirect count exceeded |
HTTP-CLIENT-RECEIVE-ERROR | unknown content encoding received or status error communicating with HTTP server (status code < 100 or > 299); in case of a status error the "arg" key of the exception hash will be set to a hash equal to the normal return value of this method including a "status_code" key (giving the status code) and a "body" key (giving the message body returned by the server) |
ENCODING-CONVERSION-ERROR | the given string could not be converted to the socket's character encoding |
SOCKET-SEND-ERROR | There was an error sending the data |
SOCKET-CLOSED | The remote end closed the connection |
SOCKET-RECV-ERROR | There was an error receiving the data |
SOCKET-TIMEOUT | Data transmission or reception for a single send() or recv() action exceeded the timeout period |
SOCKET-SSL-ERROR | There was an SSL error while reading data from the socket |
SOCKET-HTTP-ERROR | Invalid HTTP data was received |
"Transfer-Encoding: chunked"
header is automatically set with this method if no "Transfer-Encoding"
header is already presentDataStreamClient::DataStreamClient::sendRecvDataStream | ( | DataStreamMessage | dsm, |
string | method, | ||
string | path, | ||
timeout | timeout_ms = 0 , |
||
*reference< hash< auto > > | info, | ||
*hash< auto > | hdr | ||
) |
Sends an HTTP request an HTTP REST server supporting the DataStream protocol with the specified method and serialized and encoded chunked message body as given by a send callback; decoded and deserialized data received from the HTTP server are returned through a receive callback.
This method is useful for sending streaming data in the request and where streaming data is also expected in the response.
If a connection has not already been established, an internal call to HTTPClient::connect() will be made before sending the message
dsm | the DataStreamMessage object providing the DataStreamMessage::sendData(), DataStreamMessage::recvData(), and DataStreamMessage::recvDataDone() methods method to be used as callbacks |
method | The name of the HTTP method ("GET" , "POST" , "HEAD" , "OPTIONS" , "PUT" , "DELETE" , "TRACE" , or "CONNECT" ). |
path | The path for the message (i.e. "/path/resource?method¶m=value" ) |
timeout_ms | the timeout in milliseconds for the socket I/O operations; 0 means use the default timeout value |
info | An optional reference to an lvalue that will be used as an output variable giving a hash of request headers and other information about the HTTP request. |
hdr | any headers to be sent with the request; headers here will override default headers for the object as well |
HTTP-CLIENT-METHOD-ERROR | invalid/unknown HTTP method passed |
HTTP-CLIENT-REDIRECT-ERROR | invalid redirect location given by remote |
HTTP-CLIENT-MAXIMUM-REDIRECTS-EXCEEDED | maximum redirect count exceeded |
HTTP-CLIENT-RECEIVE-ERROR | unknown content encoding received or status error communicating with HTTP server (status code < 100 or > 299); in case of a status error the "arg" key of the exception hash will be set to a hash equal to the normal return value of this method including a "status_code" key (giving the status code) and a "body" key (giving the message body returned by the server) |
ENCODING-CONVERSION-ERROR | the given string could not be converted to the socket's character encoding |
SOCKET-SEND-ERROR | There was an error sending the data |
SOCKET-CLOSED | The remote end closed the connection |
SOCKET-RECV-ERROR | There was an error receiving the data |
SOCKET-TIMEOUT | Data transmission or reception for a single send() or recv() action exceeded the timeout period |
SOCKET-SSL-ERROR | There was an SSL error while reading data from the socket |
SOCKET-HTTP-ERROR | Invalid HTTP data was received |
"Transfer-Encoding: chunked"
header is automatically set with this method if no "Transfer-Encoding"
header is already presentDataStreamClient::DataStreamClient::setContentEncoding | ( | string | enc = 'auto' | ) |
sets the request and desired response encoding for the object; see EncodingSupport for valid options
enc | the data content encoding (compression) option for requests and the desired response content encoding for the object; see EncodingSupport for valid options; if the value "auto" is passed then "gzip" encoding is used for outgoing requests and requested for responses |
RESTCLIENT-ERROR | invalid or unsupported data content encoding / compression option |