Options
All
  • Public
  • Public/Protected
  • All
Menu

OData request configuration for an entity type.

typeparam EntityT

Type of the entity to setup a request for

Type parameters

  • RequestConfigT: ODataRequestConfig

Hierarchy

  • ODataRequest

Index

Constructors

  • Creates an instance of ODataRequest.

    Type parameters

    • RequestConfigT: ODataRequestConfig<RequestConfigT>

    Parameters

    • config: RequestConfigT

      Configuration of the request.

    • Optional _destination: Destination

      Destination to setup the request against.

    Returns ODataRequest<RequestConfigT>

Properties

config: RequestConfigT

Accessors

  • Returns undefined | Destination

  • Parameters

    Returns void

Methods

  • customHeaders(): Record<string, any>
  • Get all custom headers.

    Returns Record<string, any>

    Key-value pairs where the key is the name of a header property and the value is the respective value

  • defaultHeaders(): Record<string, any>
  • Get all default headers. If custom headers are set, those take precedence.

    Returns Record<string, any>

    Key-value pairs where the key is the name of a header property and the value is the respective value

  • eTagHeaders(): Record<string, any>
  • Get the eTag related headers, e. g. if-match.

    Returns Record<string, any>

    Key-value pairs where the key is the name of a header property and the value is the respective value

  • Execute the given request and return the according promise.

    Returns Promise<HttpResponse>

    Promise resolving to the requested data

  • headers(): Promise<Record<string, any>>
  • Create object containing all headers, including custom headers for the given request.

    Returns Promise<Record<string, any>>

    Key-value pairs where the key is the name of a header property and the value is the respective value

  • needsAuthentication(): boolean
  • Specifies whether the destination needs a specific authentication or not.

    Returns boolean

    A boolean value that specifies whether the destination needs authentication or not

  • query(): string
  • Get query parameters as string. Leads with ? if there are parameters to return.

    Returns string

    Query parameter string

  • relativeResourceUrl(includeServicePath?: boolean): string
  • Returns the relative URL to a specific OData resource.

    Parameters

    • Optional includeServicePath: boolean

      Whether or not to include the service path in the URL.

    Returns string

    The relative URL of the resource.

  • relativeServiceUrl(): string
  • Returns the service URL relative to the url of the destination for a given OData request.

    Returns string

    The relative URL of the service the given entity belongs to.

  • relativeUrl(includeServicePath?: boolean, includeQueryParameters?: boolean): string
  • Constructs a URL relative to the destination.

    Parameters

    • Optional includeServicePath: boolean

      Whether or not to include the service path in the URL.

    • Optional includeQueryParameters: boolean

      Whether or not to include the query parameters in the URL.

    Returns string

    The relative URL for the request.

  • resourceUrl(): string
  • Returns the URL to a specific OData .resource, i.e. the entity collection.

    Returns string

    The URL of the resource

  • serviceUrl(): string
  • Returns the service URL for a given OData request.

    Returns string

    The URL of the service the given entity belongs to

  • url(): string
  • Constructs an absolute URL for the given request.

    Returns string

    The absolute URL for the request.

    Copyright Ⓒ 2023 SAP SE or an SAP affiliate company. All rights reserved.