Skip to main content

httpUtils

Index

Enumerations

Method

Method:

DELETE

DELETE: DELETE

GET

GET: GET

POST

POST: POST

PUT

PUT: PUT

Type Aliases

Body

Body: {} | string | Buffer | null

Options

Options: { configuration: Configuration; customErrorMessage?: (err: RequestError, configuration: Configuration) => string | null; headers?: {}; jsonRequest?: boolean; jsonResponse?: boolean; method?: Method; wrapNetworkRequest?: (executor: () => Promise<Response>, extra: WrapNetworkRequestInfo) => Promise<() => Promise<Response>> }

Type declaration

Response

Response: { body: any; headers: IncomingHttpHeaders; statusCode: number; statusMessage?: string }

Type declaration

  • body: any
  • headers: IncomingHttpHeaders
  • statusCode: number
  • optionalstatusMessage?: string

Functions

del

  • del(target: string, __namedParameters: Options): Promise<Buffer>
  • Parameters

    • target: string
    • __namedParameters: Options

    Returns Promise<Buffer>

get

  • get(target: string, __namedParameters: Options): Promise<any>
  • Parameters

    • target: string
    • __namedParameters: Options

    Returns Promise<any>

getNetworkSettings

  • getNetworkSettings(target: string | URL, opts: { configuration: Configuration }): { enableNetwork: null | boolean; httpProxy: null | string; httpsCaFilePath: null | PortablePath; httpsCertFilePath: null | PortablePath; httpsKeyFilePath: null | PortablePath; httpsProxy: null | string }
  • Searches through networkSettings and returns the most specific match


    Parameters

    Returns { enableNetwork: null | boolean; httpProxy: null | string; httpsCaFilePath: null | PortablePath; httpsCertFilePath: null | PortablePath; httpsKeyFilePath: null | PortablePath; httpsProxy: null | string }

    • enableNetwork: null | boolean
    • httpProxy: null | string
    • httpsCaFilePath: null | PortablePath
    • httpsCertFilePath: null | PortablePath
    • httpsKeyFilePath: null | PortablePath
    • httpsProxy: null | string

post

  • post(target: string, body: Body, __namedParameters: Options): Promise<Buffer>
  • Parameters

    Returns Promise<Buffer>

put

  • put(target: string, body: Body, __namedParameters: Options): Promise<Buffer>
  • Parameters

    Returns Promise<Buffer>

request

  • request(target: string | URL, body: Body, __namedParameters: Omit<Options, customErrorMessage>): Promise<Response>
  • Parameters

    • target: string | URL
    • body: Body
    • __namedParameters: Omit<Options, customErrorMessage>

    Returns Promise<Response>