Skip to main content

HTTP APIs

The HTTP APIs (api.http) provides access to HTTP client functionality.

fetch

Provides ability to perform HTTP requests.

Note

Note: this method is a proxy for the Web Fetch API. Refer to the original documentation for additional details: https://developer.mozilla.org/en-US/docs/Web/API/fetch.

Method

fetch(input: RequestInfo, init?: RequestInit): Promise<Response>

Parameters

Name

Type

Description

resource

RequestInfo

Defines the resource to fetch

init

RequestInit

(Optional) An object that contains custom settings to apply to the request

Returns

Promise<Response> Returns Response object. For more information, see https://developer.mozilla.org/en-US/docs/Web/API/Response.