Creates an instance of AbstractRestClient.
representing connection to this api
Last byte received when response is being streamed
Bytes received from the server response so far
Contains REST chucks
If we get a response containing a Content-Encoding header, and it matches an encoding type that we recognize, it is saved here
If we get a response containing a Content-Length header, it is saved here
Contains buffered data after all REST chucks are received
Whether or not to try and decode any encoded response
Indicates if payload data is JSON to be stringified before writing
Instance of logger
Indicates if request data should have its newlines normalized to /n before sending each chunk to the server
Indicates if response data should have its newlines normalized for the current platform (\r\n for windows, otherwise \n)
Reject for errors when obtaining data
Save req headers
Save request
stream for outgoing request data to the server
Resolved when all data has been obtained
Save resource
Contain response from http(s) request
Stream for incoming response data from the server. If specified, response data will not be buffered
Task used to display progress bars or other user feedback mechanisms Automatically updated if task is specified and streams are provided for upload/download
Save write data
Return http(s) response body as a buffer
Return http(s) response body as a string
Return the logger object for ease of reference
Return whether or not a REST request was successful by HTTP status code
Return whether or not a REST request was successful by HTTP status code
Return http(s) response object
Return this session object
Append specific headers for all requests by overriding this implementation
list of headers
Process and customize errors encountered in your client. This is called any time an error is thrown from a failed Rest request using this client. error before receiving any response body from the API. You can use this, for example, to set the error tag for you client or add additional details to the error message. If you return null or undefined, Imperative will use the default error generated for your failed request.
the error encountered by the client
processedError - the error with the fields set the way you want them
Perform the actual http REST call with appropriate user input
REST HTTP DELETE operation
representing connection to this api
URI for which this request should go against
headers to include in the REST request
REST HTTP delete operation returning full HTTP(S) Response
representing connection to this api
list of parameters
Wrap post for common error handling and supporting generic JSON types
object type to return
representing connection to this api
the API URI that we are targeting
headers for the http(s) request
REST HTTP DELETE operation
representing connection to this api
URI for which this request should go against
headers to include in the REST request
REST HTTP DELETE operation
representing connection to this api
URI for which this request should go against
headers to include in the REST request
stream to which the response data will be written
streaming only - true if you want newlines to be \r\n on windows when receiving data from the server to responseStream. Don't set this for binary responses
task used to update the user on the progress of their request
Helper method to extract requested data from response object If list is not passed, returns entire response
HTTP(S) response object
list with object properties to return
REST HTTP GET operation
representing connection to this api
URI for which this request should go against
headers to include in the REST request
REST HTTP GET operation returning full HTTP(S) Response
representing connection to this api
URI for which this request should go against
Wrap get for common error handling and supporting generic JSON types
object type to return
representing connection to this api
the API URI that we are targeting
headers for the http(s) request
REST HTTP GET operation
representing connection to this api
URI for which this request should go against
headers to include in the REST request
REST HTTP GET operation - streaming the response to a writable stream
representing connection to this api
URI for which this request should go against
headers to include in the REST request
the stream to which the response data will be written
streaming only - true if you want newlines to be \r\n on windows when receiving data from the server to responseStream. Don't set this for binary responses
task used to update the user on the progress of their request
Helper method to return an indicator for whether or not a URI contains a query string.
URI
REST HTTP POST operation
representing connection to this api
URI for which this request should go against
headers to include in the REST request
payload data
REST HTTP post operation returning full HTTP(S) Response
representing connection to this api
list of parameters
Wrap post for common error handling and supporting generic JSON types
object type to return
representing connection to this api
the API URI that we are targeting
headers for the http(s) request
data to write on the http(s) request
REST HTTP POST operation
representing connection to this api
URI for which this request should go against
headers to include in the REST request
payload data
REST HTTP POST operation streaming both the request and the response
representing connection to this api
URI for which this request should go against
headers to include in the REST request
stream to which the response data will be written
stream from which payload data will be read
streaming only - true if you want newlines to be \r\n on windows when receiving data from the server to responseStream. Don't set this for binary responses
streaming only - true if you want \r\n to be replaced with \n when sending data to the server from requestStream. Don't set this for binary requests
task used to update the user on the progress of their request
REST HTTP POST operation, streaming only the request and not the response
representing connection to this api
URI for which this request should go against
headers to include in the REST request
stream from which payload data will be read
streaming only - true if you want \r\n to be replaced with \n when sending data to the server from requestStream. Don't set this for binary requests
task used to update the user on the progress of their request
REST HTTP PUT operation
representing connection to this api
URI for which this request should go against
headers to include in the REST request
payload data
REST HTTP PUT operation returning full HTTP(S) Response
representing connection to this api
list of parameters
Wrap put for common error handling and supporting generic JSON types
object type to return
representing connection to this api
the API URI that we are targeting
headers for the http(s) request
data to write on the http(s) request
REST HTTP PUT operation
representing connection to this api
URI for which this request should go against
headers to include in the REST request
payload data
REST HTTP PUT operation with streamed response and request
representing connection to this api
URI for which this request should go against
headers to include in the REST request
stream to which the response data will be written
stream from which payload data will be read
streaming only - true if you want newlines to be \r\n on windows when receiving data from the server to responseStream. Don't set this for binary responses
streaming only - true if you want \r\n to be replaced with \n when sending data to the server from requestStream. Don't set this for binary requests
task used to update the user on the progress of their request
REST HTTP PUT operation with only streamed request, buffers response data and returns it
representing connection to this api
URI for which this request should go against
headers to include in the REST request
stream from which payload data will be read
streaming only - true if you want \r\n to be replaced with \n when sending data to the server from requestStream. Don't set this for binary requests
task used to update the user on the progress of their request
Generated using TypeDoc
Class to handle http(s) requests, build headers, collect data, report status codes, and header responses and passes control to session object for maintaining connection information (tokens, checking for timeout, etc...)