A proxy to access HTTP services.
- Source:
Extends
Methods
(static) newInstance()
- Source:
- See:
-
- caf_components/supervisor
Factory method to access external HTTP services.
dirtyCall(url, args, cb)
- Source:
Calls an external http service.
It does not respect transaction semantics, and it will not be delayed or rollbacked.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | A URL for the service. |
args |
Object | A map with optional arguments to form a query string. |
cb |
caf.cb | A callback with results or an error. |
dirtyCallPromise(url, args) → {Promise}
- Source:
Calls an external http service returning a promise for the results.
It does not respect transaction semantics, and it will not be delayed or rollbacked.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | A URL for the service. |
args |
Object | A map with optional arguments to form a query string. |
Returns:
A promise with the results.
- Type
- Promise
startStream(url, args, methodName) → {caf.request}
- Source:
Starts an http stream returning JSON objects.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | A URL for the service. |
args |
Object | A map with optional arguments to form a query string. |
methodName |
string | A method to process the stream objects.
The method signature is |
Returns:
A request id for this stream.
- Type
- caf.request
stopStream(The)
- Source:
Stops streaming.
Parameters:
Name | Type | Description |
---|---|---|
The |
caf.request | id of the http stream |