Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MethodRequestBuilderBase<RequestConfigT>

Base class for all request builders.

abstract
typeparam

Type of the entity to create a request for

Type parameters

  • RequestConfigT: ODataRequestConfig

Hierarchy

Index

Constructors

constructor

  • Creates an instance of MethodRequestBuilderBase.

    Parameters

    • requestConfig: RequestConfigT

      Request configuration to initialize with

    Returns MethodRequestBuilderBase

Properties

Protected requestConfig

requestConfig: RequestConfigT

Request configuration to initialize with

Methods

build

  • Build an ODataRequest that holds essential configuration for the service request and executes it.

    Parameters

    Returns Promise<ODataRequest<RequestConfigT>>

    The OData request executor including the destination configuration.

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