144 const Version =
"1.1";
147 const VersionString = sprintf(
"Qore-DataStreamClient/%s", DataStreamClient::Version);
150 const DefaultHeaders = ...;
208 recvDataStream(code rcb, code ecb,
string method,
string path,
auto body, timeout timeout_ms = 0, *reference<hash<auto>> info, *hash<auto> hdr);
278 hash<auto>
sendDataStream(code scb,
string method,
string path, timeout timeout_ms = 0, *reference<hash<auto>> info, *hash<auto> hdr);
356 sendRecvDataStream(code scb, code rcb, code ecb,
string method,
string path, timeout timeout_ms = 0, *reference<hash<auto>> info, *hash<auto> hdr);
426 hash<auto>
sendRawStream(code scb,
string method, *
string path, timeout timeout_ms = 0, *reference<hash<auto>> info, *hash<auto> hdr);
465 hash<auto>
getRawStream(code rcb,
string method, *
string path,
auto body, timeout timeout_ms = 0, *reference<hash<auto>> info, *hash<auto> hdr);
499 nothing
prepareMsg(
string method,
string path, reference<auto> body, reference<hash<auto>> hdr,
string ct =
'Content-Type');
504 hash<auto>
sendAndDecodeResponse(*data body,
string m,
string path, hash<auto> hdr, *reference<hash<auto>> info, *softbool decode_errors);
hash< auto > getRawStream(code rcb, 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
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
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
constructor(*hash< auto > opts, *softbool do_not_connect)
calls the base class RestClient constructor and optionally connects to the REST server
recvDataStream(code rcb, code ecb, 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 decod...
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 metho...
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 supporting the DataStream protocol with the specified me...
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 me...
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 decod...
sendRecvDataStream(code scb, code rcb, code ecb, 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 metho...
addDefaultHeaders(hash< auto > h)
adds default headers to each request; these headers will be sent in all requests but can be overridde...
nothing prepareMsg(string method, string path, reference< auto > body, reference< hash< auto >> hdr, string ct='Content-Type')
sets up headers and encodes any body for sending
this class can be used to send and receive data using the DataStream protocol
Definition: DataStreamClient.qm.dox.h:134
this class can be used to send and receive data using the DataStream protocol
Definition: DataStreamClient.qm.dox.h:99
nothing recvData(auto data)
receives decoded data from the remote end and calls recvDataImpl()
nothing recvDataDone(*string err)
this method is called when all data has been received; this method calls recvDataDoneImpl()
abstract nothing recvDataImpl(auto data)
reimplement this method in subclasses to receive decoded and deserialized data
nothing recvDataDoneImpl(*string err)
this method is called when all data has been received
this class can be used to send and receive data using the DataStream protocol
Definition: DataStreamClient.qm.dox.h:79
abstract auto sendDataImpl()
reimplement this method in subclasses to support streamed data transfers; when this method returns no...
auto sendData()
this method returns data to be returned to the server; when this method returns no value,...
the DataStreamClient namespace contains all the public objects in the DataStreamClient module
Definition: DataStreamClient.qm.dox.h:77