Options
All
  • Public
  • Public/Protected
  • All
Menu

Class for Request format

Hierarchy

  • HttpRequest

Index

Constructors

  • Parameters

    • method: "DELETE" | "GET" | "POST" | "PUT" | "PATCH"

      type of http method

    • reqInit: HttpRequestInit

      request object

      @example
      const httpRequest = new HttpRequest('POST', {name: 'test', value: 'test_value})

    Returns HttpRequest

Properties

body?: any
headers?: HttpHeader[]
method: string

Methods

  • getBodyInit(): BodyInit
  • Returns BodyInit

    • stringified body init object
    @example
    cont getBody = this.getBodyInit()
  • getHeaderInit(): HeadersInit
  • Returns HeadersInit

    • header init object
    @example
    const header = this.getHeaderInit()
  • hasBody(): boolean
  • Returns boolean

    • body value of the request header
    @example
    const testObj = this.hasBody();
  • toRequestInit(): RequestInit
  • Returns RequestInit

    • request init object
    @example
    const reqInit = toRequestInit()

Generated using TypeDoc