Options
All
  • Public
  • Public/Protected
  • All
Menu

OData request configuration for an entity type.

typeparam

Type of the entity to setup a request for

Type parameters

  • RequestConfigT: ODataRequestConfig

Hierarchy

  • ODataRequest

Index

Constructors

constructor

  • new ODataRequest<RequestConfigT>(config: RequestConfigT, _destination?: Destination): ODataRequest<RequestConfigT>
  • Creates an instance of ODataRequest.

    memberof

    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

config: RequestConfigT

Accessors

destination

  • Returns undefined | Destination

  • Parameters

    Returns void

Methods

customHeaders

  • 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

  • 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

  • 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

  • Execute the given request and return the according promise.

    Returns Promise<HttpResponse>

    Promise resolving to the requested data

headers

  • 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

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

    memberof

    ODataRequest

    Returns boolean

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

query

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

    Returns string

    Query parameter string

relativeResourceUrl

  • 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

  • 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

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

    Parameters

    • Optional includeServicePath: boolean

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

    Returns string

    The relative URL for the request.

resourceUrl

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

    Returns string

    The URL of the resource

serviceUrl

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

    Returns string

    The URL of the service the given entity belongs to

url

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

    Returns string

    The absolute URL for the request