Skip to main content

Melon.http.request(resource, method, body, headers)

Requests an external resource.

Status: stable
Returns: Response

Parameters

NameTypeDescription
resourcestringThe target resource to be fetched
methodstringThe operation http method
bodyRecord<string, any>The body to be sent in the request
headersRecord<string, any>The headers to be sent in the request

Example usage

const { request } = Melon.http; 

const result = request("resource");