Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RestRequestBuilder<ApiT, FnT>

Generic request builder for building and executing REST request requests based on apis generated by the OpenAPI generator.

Type parameters

  • ApiT

    Interface of the generated api. All properties of the interface will be treated as functions.

  • FnT: keyof ApiT

    Literal string type of the function name, must be a key of ApiT and represent a function.

Hierarchy

  • RestRequestBuilder

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

fn

fn: FnT

Name of the function represented in thie request builder.

Methods

execute

withCustomHeaders

  • withCustomHeaders(headers: Record<string, string>): this
  • Add custom headers to the request.

    Parameters

    • headers: Record<string, string>

      Key-value pairs denoting additional custom headers

    Returns this

    The request builder itself, to facilitate method chaining