Module: net

Classes

AuthorizationV2Builder
Environment
HttpHeaders
LocationDatumMetadataUrlHelper
LocationDatumUrlHelper
NodeDatumMetadataUrlHelper
NodeDatumUrlHelper
NodeInstructionUrlHelper
NodeMetadataUrlHelper
UrlHelper
UserAuthTokenUrlHelper
UserMetadataUrlHelper

Mixins

LocationDatumMetadataUrlHelperMixin
LocationDatumUrlHelperMixin
LocationUrlHelperMixin
NodeDatumMetadataUrlHelperMixin
NodeDatumUrlHelperMixin
NodeInstructionUrlHelperMixin
NodeMetadataUrlHelperMixin
NodeUrlHelperMixin
QueryUrlHelperMixin
UserAuthTokenUrlHelperMixin
UserMetadataUrlHelperMixin
UserUrlHelperMixin

Members


<inner, constant> HttpContentType :string

Enumeration of common HTTP Content-Type values.

Type:
  • string
Properties:
Name Type Default Description
APPLICATION_JSON string application/json
APPLICATION_JSON_UTF8 string application/json; charset=UTF-8
FORM_URLENCODED string application/x-www-form-urlencoded
FORM_URLENCODED_UTF8 string application/x-www-form-urlencoded; charset=UTF-8

<inner, constant> HttpMethod :string

Enumeration of HTTP methods (verbs).

Type:
  • string
Properties:
Name Type Default Description
GET string GET
HEAD string HEAD
POST string POST
PUT string PUT
PATCH string PATCH
DELETE string DELETE
OPTIONS string OPTIONS
TRACE string TRACE

<inner, constant> instructionParameter

The static NodeInstructionUrlHelperMixin#instructionParameter method so it can be imported directly.


<inner, constant> SolarQueryApiPathV1 :string

The SolarQuery REST API path.

Type:
  • string

<inner, constant> SolarQueryDefaultPath :string

The SolarQuery default path.

Type:
  • string

<inner, constant> SolarQueryPathKey :string

The module:net~UrlHelper#parameters key for the SolarQuery path.

Type:
  • string

<inner, constant> SolarQueryPublicPathKey :string

The module:net~UrlHelper#parameters key that holds a boolean flag to use the public path scheme (/pub) when constructing URLs.

Type:
  • string

<inner, constant> SolarUserApiPathV1 :string

The SolarUser REST API path.

Type:
  • string

<inner, constant> SolarUserDefaultPath :string

The SolarUser default path.

Type:
  • string

<inner, constant> SolarUserPathKey :string

The module:net~UrlHelper parameters key for the SolarUser path.

Type:
  • string

Methods


<inner> urlQueryEncode(parameters, encoderFn)

Encode the properties of an object as a URL query string.

If an object property has an array value, multiple URL parameters will be encoded for that property.

The optional encoderFn argument is a function that accepts a string value and should return a URI-safe string for that value.

Parameters:
Name Type Description
parameters object

an object to encode as URL parameters

encoderFn function

an optional function to encode each URI component with; if not provided the built-in encodeURIComponent() function will be used

Returns:

the encoded query parameters

Type
string

<inner> urlQueryParse(search)

Parse the query portion of a URL string, and return a parameter object for the parsed key/value pairs.

Multiple parameters of the same name will be stored as an array on the returned object.

Parameters:
Name Type Description
search string

the query portion of the URL, which may optionally include the leading ? character

Returns:

the parsed query parameters, as a parameter object

Type
object