Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Tools/Network

Index

Type Aliases

httpRequest: HttpRequestOptions
deprecated

Use HttpRequestOptions

Functions

  • addNetwork<B>(base: B): B & { httpRequest: ((parameters: HttpRequestOptions) => Promise<any>) }
  • Make an HTTP request using the Fetch API. This function supports GET and POST methods, and can handle different response types including text, JSON, and HTML. It also provides success and error callbacks for handling the response.

    Parameters

    • parameters: HttpRequestOptions

      An object containing the request options such as URL, method, body, response type, and callbacks.

    Returns Promise<any>

    A promise that resolves with the parsed response data or rejects with an error.

Generated using TypeDoc