new Gateway(options)
Parameters:
| Name | Type | Description |
|---|---|---|
options |
object | Extends the fetch init options object, this will be merged with the same options object that can be specified per call, and passed to fetch when a request is done. |
- Source:
Methods
-
delete(action, data, options_)
-
DELETE shorthand for the execute method
Parameters:
Name Type Default Description actionstring dataany null options_Object - Source:
Returns:
A IGatewayResult
Promise - Type
- Promise
-
<async> execute(action, data, options_)
-
Executes the gateway request
Parameters:
Name Type Description actionstring dataany options_Object - Source:
Returns:
A IGatewayResult
Promise - Type
- Promise
-
get(action, data, options_)
-
GET shorthand for the execute method
Parameters:
Name Type Default Description actionstring dataany null options_Object - Source:
-
getOptions()
-
Returns the passed options
- Source:
Returns:
- Type
- Object
-
head(action, data, options_)
-
HEAD shorthand for the execute method
Parameters:
Name Type Default Description actionstring dataany null options_Object - Source:
Returns:
A IGatewayResult
Promise - Type
- Promise
-
patch(action, data, options_)
-
PATCH shorthand for the execute method
Parameters:
Name Type Description actionstring dataany options_Object - Source:
Returns:
A IGatewayResult
Promise - Type
- Promise
-
post(action, data, options_)
-
POST shorthand for the execute method
Parameters:
Name Type Description actionstring dataany options_IGatewayCallOptions - Source:
Returns:
A IGatewayResult
Promise - Type
- Promise
-
put(action, data, options_)
-
PUT shorthand for the execute method
Parameters:
Name Type Description actionstring dataany options_Object - Source:
Returns:
A IGatewayResult
Promise - Type
- Promise
-
setOptions(options)
-
Sets global options
Gateway defaults are managed here
Parameters:
Name Type Description optionsObject global gateway options
- Source: