Skip to main content

Melon.http.fetch(resource, options)

Starts the process of fetching a resource from the network, returning a promise which is fulfilled once the response is available.

Status: stable
Returns: Promise<Response>

Parameters

NameTypeDescription
resourcestringThe target resource to be fetched
optionsRecord<string, any>Options object to populate the method

Example usage

const result = await fetch("resource").json();