Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MethodRequestBuilderBase<EntityT, RequestConfigT>

Base class for all request builders.

abstract

Type parameters

Hierarchy

Implements

Index

Constructors

constructor

  • Creates an instance of MethodRequestBuilderBase.

    Parameters

    • entityConstructor: Constructable<EntityT>

      Constructor type of the entity to create a request for

    • requestConfig: RequestConfigT

      Request configuration to initialize with

    Returns MethodRequestBuilderBase

Properties

entityConstructor

entityConstructor: Constructable<EntityT>

Constructor type of the entity to create a request for

Protected requestConfig

requestConfig: RequestConfigT

Request configuration to initialize with

Methods

build

Protected getKeyFieldNames

  • getKeyFieldNames(): string[]
  • Returns string[]

url

  • Create the url based on configuration of the given builder

    Parameters

    Returns Promise<string>

    Promise resolving to the url for the request

withCustomHeaders

  • withCustomHeaders(headers: MapType<string>): this
  • Add custom headers to the request

    Parameters

    • headers: MapType<string>

      Key-value pairs denoting additional custom headers

    Returns this

    The request builder itself, to facilitate method chaining

withCustomServicePath

  • withCustomServicePath(servicePath: string): this
  • Replace the default service path with the given custom path. In case of the S/4HANA apis the servicePath defaults to '/sap/opu/odata/sap/' and can be overwritten here.

    Parameters

    • servicePath: string

      Path to override the default with

    Returns this

    The request builder itself, to facilitate method chaining