Class: UserAgentRequest

nationscript/requests/misc~UserAgentRequest()

Request subclass for making requests to the user agent endpoint of the API.

Constructor

new UserAgentRequest()

mandates the a argument and sets it.

Methods

(async) send() → {Promise.<string>}

Calls the raw function and passes its return value through the streamToString function, cutting the introductory part of the API's text response before returning it.

Returns:

The User-Agent header as visible to the API

Type
Promise.<string>