Hierarchy

  • HttpClient

Constructors

Properties

Methods

Constructors

Properties

httpStatus: { ACCEPTED: number; BAD_GATEWAY: number; BAD_REQUEST: number; CONFLICT: number; CONTINUE: number; CREATED: number; EXPECTATION_FAILED: number; FORBIDDEN: number; GATEWAY_TIMEOUT: number; GONE: number; HTTP_VERSION_NOT_SUPPORTED: number; IM_A_TEAPOT: number; INSUFFICIENT_SPACE_ON_RESOURCE: number; INSUFFICIENT_STORAGE: number; INTERNAL_SERVER_ERROR: number; LENGTH_REQUIRED: number; LOCKED: number; METHOD_FAILURE: number; METHOD_NOT_ALLOWED: number; MOVED_PERMANENTLY: number; MOVED_TEMPORARILY: number; MULTIPLE_CHOICES: number; MULTI_STATUS: number; NETWORK_AUTHENTICATION_REQUIRED: number; NON_AUTHORITATIVE_INFORMATION: number; NOT_ACCEPTABLE: number; NOT_FOUND: number; NOT_IMPLEMENTED: number; NOT_MODIFIED: number; NO_CONTENT: number; OK: number; PARTIAL_CONTENT: number; PAYMENT_REQUIRED: number; PERMANENT_REDIRECT: number; PRECONDITION_FAILED: number; PRECONDITION_REQUIRED: number; PROCESSING: number; PROXY_AUTHENTICATION_REQUIRED: number; REQUESTED_RANGE_NOT_SATISFIABLE: number; REQUEST_HEADER_FIELDS_TOO_LARGE: number; REQUEST_TIMEOUT: number; REQUEST_TOO_LONG: number; REQUEST_URI_TOO_LONG: number; RESET_CONTENT: number; SEE_OTHER: number; SERVICE_UNAVAILABLE: number; SWITCHING_PROTOCOLS: number; TEMPORARY_REDIRECT: number; TOO_MANY_REQUESTS: number; UNAUTHORIZED: number; UNPROCESSABLE_ENTITY: number; UNSUPPORTED_MEDIA_TYPE: number; USE_PROXY: number; getStatusCode: ((reasonPhrase: string) => number); getStatusText: ((statusCode: string | number) => string) } = HttpStatus

Type declaration

  • ACCEPTED: number
  • BAD_GATEWAY: number
  • BAD_REQUEST: number
  • CONFLICT: number
  • CONTINUE: number
  • CREATED: number
  • EXPECTATION_FAILED: number
  • FORBIDDEN: number
  • GATEWAY_TIMEOUT: number
  • GONE: number
  • HTTP_VERSION_NOT_SUPPORTED: number
  • IM_A_TEAPOT: number
  • INSUFFICIENT_SPACE_ON_RESOURCE: number
  • INSUFFICIENT_STORAGE: number
  • INTERNAL_SERVER_ERROR: number
  • LENGTH_REQUIRED: number
  • LOCKED: number
  • METHOD_FAILURE: number
  • METHOD_NOT_ALLOWED: number
  • MOVED_PERMANENTLY: number
  • MOVED_TEMPORARILY: number
  • MULTIPLE_CHOICES: number
  • MULTI_STATUS: number
  • NETWORK_AUTHENTICATION_REQUIRED: number
  • NON_AUTHORITATIVE_INFORMATION: number
  • NOT_ACCEPTABLE: number
  • NOT_FOUND: number
  • NOT_IMPLEMENTED: number
  • NOT_MODIFIED: number
  • NO_CONTENT: number
  • OK: number
  • PARTIAL_CONTENT: number
  • PAYMENT_REQUIRED: number
  • PERMANENT_REDIRECT: number
  • PRECONDITION_FAILED: number
  • PRECONDITION_REQUIRED: number
  • PROCESSING: number
  • PROXY_AUTHENTICATION_REQUIRED: number
  • REQUESTED_RANGE_NOT_SATISFIABLE: number
  • REQUEST_HEADER_FIELDS_TOO_LARGE: number
  • REQUEST_TIMEOUT: number
  • REQUEST_TOO_LONG: number
  • REQUEST_URI_TOO_LONG: number
  • RESET_CONTENT: number
  • SEE_OTHER: number
  • SERVICE_UNAVAILABLE: number
  • SWITCHING_PROTOCOLS: number
  • TEMPORARY_REDIRECT: number
  • TOO_MANY_REQUESTS: number
  • UNAUTHORIZED: number
  • UNPROCESSABLE_ENTITY: number
  • UNSUPPORTED_MEDIA_TYPE: number
  • USE_PROXY: number
  • getStatusCode: ((reasonPhrase: string) => number)
      • (reasonPhrase: string): number
      • Returns the status code for the given reason phrase. If the given reason phrase does not exist, undefined is returned.

        Returns

        The associated status code

        Parameters

        • reasonPhrase: string

          The HTTP reason phrase (e.g. "Bad Request", "OK")

        Returns number

  • getStatusText: ((statusCode: string | number) => string)
      • (statusCode: string | number): string
      • Returns the reason phrase for the given status code. If the given status code does not exist, an error is thrown.

        Returns

        The associated reason phrase (e.g. "Bad Request", "OK")

        Parameters

        • statusCode: string | number

          The HTTP status code

        Returns string

Methods

  • Type Parameters

    • T

    Parameters

    • resource: string
    • extraHeaders: Headers = {}

    Returns Promise<T>

  • Type Parameters

    • T

    Parameters

    • resource: string
    • headers: Headers = {}

    Returns Promise<T>

  • Type Parameters

    • T

    Parameters

    • resource: string
    • extraHeaders: Headers = {}

    Returns Promise<T>