Members
Type Definitions
ApiHeaders
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
Content-Type |
string
|
<optional> |
application/json | Content-Type header. Defaults to 'application/json' |
Authorization |
string
|
<optional> |
Optional authorization header(s). Can be set using |
Type:
-
object
ApiSettings
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
root |
string
|
Root url/domain for this API |
||
stage |
string
|
<optional> |
API stage (useful for API's built on serverless) |
|
prefix |
string
|
<optional> |
API prefix (i.e. "api") |
|
version |
string
|
<optional> |
API version (i.e. "v1") |
|
verbose |
boolean
|
<optional> |
false | Enable debug logs |
secureOnly |
boolean
|
<optional> |
true | Enforce HTTPS API |
authorization |
string
|
<optional> |
'None' | Authorization type ('Basic' or 'Bearer') |
defaultOptions |
FetchOptions
|
<optional> |
Default options to be used for every fetch call |
Type:
-
object
FetchOptions
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
method |
string
|
<optional> |
GET | HTTP method for fetch request(s). Defaults to 'GET' |
headers |
ApiHeaders
|
<optional> |
HTTP headers for fetch requests(s). |
|
body |
object
|
<optional> |
HTTP request payload |
Type:
-
object