NSOA.https.get(request)

Use this function to send an HTTPS GET request to retrieve data from a server. The data is identified by a unique URL and parameters can be passed to the server using query string parameters. What data is returned depends on the implementation of the server. The function will return an error if the URL requested does not use the HTTPS protocol. The function will follow redirects up to a maximum of 7. The response must not exceed 1MB in size.

Note:

If the client doesn’t start receiving a response from the server within 45 seconds of the request being fully sent, a connection timeout occurs. If the request times out, a response object is returned with a standard HTTP Status Code (500) and a "Client-Warning" header set.

Parameters

Property

Type

Required / Optional

Description

url

string

required

The HTTPS URL being requested.

headers

object

optional

The HTTPS headers.

Returns

Property

Type

Description

body

string|object

The GET data.

code

string

The HTTP response status code.

headers

object

The response headers.

Units Limit

For more information, see Scripting Governance.

Since

Example

See Code Samples for more examples.