72 namespace DataStreamClient {
152 const VersionString = sprintf(
"Qore-DataStreamClient/%s", DataStreamClient::Version);
156 "User-Agent": DataStreamClient::VersionString,
184 constructor(*hash opts, *softbool do_not_connect) ;
217 recvDataStream(code rcb, code ecb,
string method,
string path, any body, timeout timeout_ms = 0, *reference<hash> info, *hash hdr);
287 hash
sendDataStream(code scb,
string method,
string path, timeout timeout_ms = 0, *reference<hash> info, *hash hdr);
365 sendRecvDataStream(code scb, code rcb, code ecb,
string method,
string path, timeout timeout_ms = 0, *reference<hash> info, *hash hdr);
435 hash
sendRawStream(code scb,
string method, *
string path, timeout timeout_ms = 0, *reference<hash> info, *hash hdr);
474 hash
getRawStream(code rcb,
string method, *
string path, any body, timeout timeout_ms = 0, *reference<hash> info, *hash hdr);
509 nothing
prepareMsg(
string method,
string path, reference body, reference<hash> hdr,
string ct =
"Content-Type");
514 hash
sendAndDecodeResponse(*data body,
string m,
string path, hash hdr, *reference<hash> info, *softbool decode_errors);
sendRecvDataStream(code scb, code rcb, code ecb, string method, string path, timeout timeout_ms=0, *reference< hash > info, *hash hdr)
Sends an HTTP request an HTTP REST server supporting the DataStream protocol with the specified metho...
recvDataStream(code rcb, code ecb, string method, string path, any body, timeout timeout_ms=0, *reference< hash > info, *hash hdr)
sends an HTTP request to an HTTP REST server supporting the DataStream protocol and returns the decod...
nothing prepareMsg(string method, string path, reference body, reference< hash > hdr, string ct="Content-Type")
sets up headers and encodes any body for sending
hash sendAndDecodeResponse(*data body, string m, string path, hash hdr, *reference< hash > info, *softbool decode_errors)
sends the outgoing HTTP message and recodes the response to data
this class can be used to send and receive data using the DataStream protocol
Definition: DataStreamClient.qm.dox.h:75
nothing recvDataDoneImpl(*string err)
this method is called when all data has been received
hash sendRawStream(code scb, string method, *string path, timeout timeout_ms=0, *reference< hash > info, *hash hdr)
send raw chunked data to the client and expect a YAML-formatted response
const Version
DataStreamClient Version.
Definition: DataStreamClient.qm.dox.h:149
const DefaultHeaders
default HTTP headers
Definition: DataStreamClient.qm.dox.h:155
nothing recvDataDone(*string err)
this method is called when all data has been received; this method calls recvDataDoneImpl() ...
abstract any sendDataImpl()
reimplement this method in subclasses to support streamed data transfers; when this method returns no...
setContentEncoding(string enc="auto")
sets the request and desired response encoding for the object; see EncodingSupport for valid options ...
this class can be used to send and receive data using the DataStream protocol
Definition: DataStreamClient.qm.dox.h:98
nothing recvData(any data)
receives decoded data from the remote end and calls recvDataImpl()
addDefaultHeaders(hash h)
adds default headers to each request; these headers will be sent in all requests but can be overridde...
any sendData()
this method returns data to be returned to the server; when this method returns no value...
const VersionString
DataStreamClient Version String.
Definition: DataStreamClient.qm.dox.h:152
hash getRawStream(code rcb, string method, *string path, any body, timeout timeout_ms=0, *reference< hash > info, *hash hdr)
receives raw chunked data using the given closure and returns any headers received ...
this class can be used to send and receive data using the DataStream protocol
Definition: DataStreamClient.qm.dox.h:138
constructor(*hash opts, *softbool do_not_connect)
calls the base class RestClient constructor and optionally connects to the REST server ...
abstract nothing recvDataImpl(any data)
reimplement this method in subclasses to receive decoded and deserialized data
hash sendDataStream(code scb, string method, string path, timeout timeout_ms=0, *reference< hash > info, *hash hdr)
Sends an HTTP request to an HTTP REST server supporting the DataStream protocol with the specified me...
this class extends RestClient with support for the DataStream protocol
Definition: DataStreamClient.qm.dox.h:144