OData request configuration for an entity type.

Type Param

Type of the entity to setup a request for.

Type Parameters

Hierarchy

  • ODataRequest

Constructors

  • Creates an instance of ODataRequest.

    Type Parameters

    Parameters

    • config: RequestConfigT

      Configuration of the request.

    • Optional _destination: Destination

      Destination to setup the request against.

    Returns ODataRequest<RequestConfigT>

Properties

config: RequestConfigT

Accessors

  • get destination(): undefined | Destination
  • Returns undefined | Destination

  • set destination(dest: undefined | Destination): void
  • Parameters

    Returns void

Methods

  • Get all custom headers.

    Returns

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

    Returns Record<string, any>

  • Get all default headers. If custom headers are set, those take precedence.

    Returns

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

    Returns Record<string, any>

  • Get the eTag related headers, e.g. if-match.

    Returns

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

    Returns Record<string, any>

  • Execute the given request and return the according promise.

    Returns

    Promise resolving to the requested data.

    Returns Promise<HttpResponse>

  • Create object containing all headers, including custom headers for the given request.

    Returns

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

    Returns Promise<OriginOptions>

  • Specifies whether the destination needs a specific authentication or not.

    Returns

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

    Returns boolean

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

    Returns

    Query parameter string.

    Returns string

  • Returns the relative URL to a specific OData resource.

    Returns

    The relative URL of the resource.

    Parameters

    • Optional includeServicePath: boolean

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

    Returns string

  • Returns the service URL relative to the url of the destination for a given OData request.

    Returns

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

    Returns string

  • Constructs a URL relative to the destination.

    Returns

    The relative URL for the request.

    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

  • Returns the URL to a specific OData .resource, i.e. the entity collection.

    Returns

    The URL of the resource.

    Returns string

  • Returns the service URL for a given OData request.

    Returns

    The URL of the service the given entity belongs to.

    Returns string

  • Constructs an absolute URL for the given request.

    Returns

    The absolute URL for the request.

    Returns string

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