 |
Qore DataStreamClient Module Reference
1.2
|
144 const Version =
"1.1";
147 const VersionString = sprintf(
"Qore-DataStreamClient/%s", DataStreamClient::Version);
150 const DefaultHeaders = RestClient::DefaultHeaders + {
151 "User-Agent": DataStreamClient::VersionString,
152 DataStreamAccept: MimeTypeYaml,
210 recvDataStream(code rcb, code ecb,
string method,
string path,
auto body, timeout timeout_ms = 0, *reference<hash<auto>> info, *hash<auto> hdr);
280 hash<auto>
sendDataStream(code scb,
string method,
string path, timeout timeout_ms = 0, *reference<hash<auto>> info, *hash<auto> hdr);
358 sendRecvDataStream(code scb, code rcb, code ecb,
string method,
string path, timeout timeout_ms = 0, *reference<hash<auto>> info, *hash<auto> hdr);
428 hash<auto>
sendRawStream(code scb,
string method, *
string path, timeout timeout_ms = 0, *reference<hash<auto>> info, *hash<auto> hdr);
467 hash<auto>
getRawStream(code rcb,
string method, *
string path,
auto body, timeout timeout_ms = 0, *reference<hash<auto>> info, *hash<auto> hdr);
501 nothing
prepareMsg(
string method,
string path, reference<auto> body, reference<hash<auto>> hdr,
string ct =
'Content-Type');
506 hash<auto>
sendAndDecodeResponse(*data body,
string m,
string path, hash<auto> hdr, *reference<hash<auto>> info, *softbool decode_errors);
this class can be used to send and receive data using the DataStream protocol
Definition: DataStreamClient.qm.dox.h:79
abstract nothing recvDataImpl(auto data)
reimplement this method in subclasses to receive decoded and deserialized data
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...
setContentEncoding(string enc='auto')
sets the request and desired response encoding for the object; see EncodingSupport for valid options
addDefaultHeaders(hash< auto > h)
adds default headers to each request; these headers will be sent in all requests but can be overridde...
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...
abstract auto sendDataImpl()
reimplement this method in subclasses to support streamed data transfers; when this method returns no...
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
this class can be used to send and receive data using the DataStream protocol
Definition: DataStreamClient.qm.dox.h:99
constructor(*hash< auto > opts, *softbool do_not_connect)
calls the base class RestClient constructor and optionally connects to the REST server
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...
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
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
nothing recvDataDoneImpl(*string err)
this method is called when all data has been received
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
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...
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...
this class can be used to send and receive data using the DataStream protocol
Definition: DataStreamClient.qm.dox.h:134
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...
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()
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