polarity-integration-utils
    Preparing search index...

    Type Alias HttpRequestOptions

    HttpRequestOptions: {
        auth?:
            | { password: string; sendImmediately?: boolean; username: string }
            | { bearer: string; sendImmediately?: boolean };
        body?: object;
        form?: object;
        headers?: object;
        json?: boolean;
        method?: HttpMethod;
        qs?: object;
        url?: string;
        [key: string]: unknown;
    } & (
        | { entities?: never; entity: Entity; requestId?: never }
        | { entities: Entity[]; entity?: never; requestId?: never }
        | { entities?: never; entity?: never; requestId: string | unknown }
        | { entities?: never; entity?: never; requestId?: never }
    )

    Type Declaration

    • [key: string]: unknown
    • Optionalauth?:
          | { password: string; sendImmediately?: boolean; username: string }
          | { bearer: string; sendImmediately?: boolean }

      The authentication options to use for the request

    • Optionalbody?: object

      The body of the request.

    • Optionalform?: object

      When passed an object or a querystring, this sets body to a querystring representation of value, and adds Content-type: application/x-www-form-urlencoded header.

    • Optionalheaders?: object

      An object containing the headers to include in the request.

      Here is an example of setting the "X-Api-Key" headers property:

      {
      headers: {
      'X-Api-Key': '1234567890'
      }
      }
    • Optionaljson?: boolean

      If true, sets body to JSON representation of value and adds Content-type: application/json header. Additionally, parses the response body as JSON.

      true
      
    • Optionalmethod?: HttpMethod

      The HTTP method to use for the request.

      'GET'
      
    • Optionalqs?: object

      An object containing querystring parameters to include in the request.

      Here is an example of setting the qs property:

      {
      qs: {
      search: 'foo'
      }
      }
    • Optionalurl?: string

      The URL to make the request to.

    • { entities?: never; entity: Entity; requestId?: never }
    • { entities: Entity[]; entity?: never; requestId?: never }
    • { entities?: never; entity?: never; requestId: string | unknown }
    • { entities?: never; entity?: never; requestId?: never }