Class: ApiEndpoint

ApiEndpoint

Data associated with describing an API endpoint, and instructions on where to send data as well as what data is allowed.

new ApiEndpoint(name, host, path [, options])

Create an instance.
Parameters:
Name Type Argument Description
name string The name of this endpoint.
host string The hostname to direct data to for this request.
path string The url path to direct data for this request.
options object <optional>
Additional options for controlling request data.
Properties
Name Type Argument Default Description
accept Array.<string> <optional>
[] Acceptable content-type headers.
maxLen number <optional>
0 Maximum number of bytes allowed per request.
methods Array.<string> <optional>
['GET,'POST'] Acceptable http methods for requests.
Source:

Members


accept :Array.<string>

List of acceptable content-type headers.
Type:
  • Array.<string>
Default Value:
  • ['application/json']
Source:

host :string

The hostname of the url to redirect data.
Type:
  • string
Source:

maxLen :number

Maximum number of bytes allowed per request.
Type:
  • number
Default Value:
  • 0
Source:

methods :Array.<string>

List of acceptable request methods.
Type:
  • Array.<string>
Default Value:
  • ['GET', 'POST']
Source:

name :string

The name of the API endpoint.
Type:
  • string
Source:

path :string

The url path to redirect data.
Type:
  • string
Source: