Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "http"

Allows you to send web requests and receive the responses.

Index

Type aliases

Headers

Headers: object

Type declaration

  • [key: string]: string | string[]

Functions

getFile

  • Downloads the content from the specified URL and attempts to save it as file.

    Parameters

    • url: string

      The URL to request from.

    • Optional destinationFilePath: string

      Optional. The downloaded file path.

    Returns Promise<File>

  • Downloads the content from the specified URL and attempts to save it as file.

    Parameters

    • options: HttpRequestOptions

      An object that specifies various request options.

    • Optional destinationFilePath: string

      Optional. The downloaded file path.

    Returns Promise<File>

getImage

getJSON

  • Downloads the content from the specified URL as a string and returns its JSON.parse representation.

    Type parameters

    • T

    Parameters

    • url: string

      The URL to request from.

    Returns Promise<T>

  • Downloads the content from the specified URL as a string and returns its JSON.parse representation.

    Type parameters

    • T

    Parameters

    Returns Promise<T>

getString

  • Downloads the content from the specified URL as a string.

    Parameters

    • url: string

      The URL to request from.

    Returns Promise<string>

  • Downloads the content from the specified URL as a string.

    Parameters

    Returns Promise<string>

request

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method