OData create request configuration for an entity type.

Type Parameters

Hierarchy

Constructors

  • Creates an instance of ODataRequest.

    Type Parameters

    • EntityT extends EntityBase<EntityT>

    • DeSerializersT extends DeSerializers<any, any, any, any, any, any, any, any, any, any, any, any, any, any, DeSerializersT>

    Parameters

    • entityApi: EntityApi<EntityT, DeSerializersT>

      Entity API for building and executing the request.

    • oDataUri: ODataUri<DeSerializersT>

      URI conversion functions.

    Returns ODataCreateRequestConfig<EntityT, DeSerializersT>

Properties

childField: Link<EntityBase, DeSerializersT, EntityApi<EntityT, any>>

Field that links the parent entity class to the child entity class.

customServicePath: string
defaultHeaders: Record<string, any>
defaultServicePath: string
entityApi: EntityApi<EntityT, DeSerializersT>
parameterEncoder: ParameterEncoder
parentKeys: Record<string, any>

Keys of the parent of the entity to create. Defined only when attempting to create child entities.

payload: string | Record<string, any>

Accessors

  • get appendedPaths(): string[]
  • Returns string[]

  • get customHeaders(): Record<string, string>
  • Returns Record<string, string>

  • set customHeaders(headers: Record<string, string>): void
  • Parameters

    • headers: Record<string, string>

    Returns void

  • get customQueryParameters(): Record<string, string>
  • Returns Record<string, string>

  • set customQueryParameters(queryParameters: Record<string, string>): void
  • Parameters

    • queryParameters: Record<string, string>

    Returns void

  • get customRequestConfiguration(): Record<string, string>
  • Returns Record<string, string>

  • set customRequestConfiguration(requestConfiguration: Record<string, string>): void
  • Parameters

    • requestConfiguration: Record<string, string>

    Returns void

  • get fetchCsrfToken(): boolean
  • Returns boolean

  • set fetchCsrfToken(fetchCsrfToken: boolean): void
  • Parameters

    • fetchCsrfToken: boolean

    Returns void

  • get timeout(): undefined | number
  • Returns undefined | number

  • set timeout(timeout: undefined | number): void
  • Parameters

    • timeout: undefined | number

    Returns void

Methods

  • Add custom headers to the request. This is useful in case you want to provide your own authorization headers for example.

    Parameters

    • headers: Record<string, string>

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

    Returns void

  • Add custom query parameters to the request. This is useful in case your OData service allows non-standard query parameters.

    Parameters

    • queryParameters: Record<string, string>

      Key-value pairs where the key is the name of a query parameter and the value is the respective value.

    Returns void

  • Add custom request configuration to the request.

    Parameters

    • requestConfiguration: Record<string, string>

      Key-value pairs where the key is the name of a request configuration and the value is the respective value.

    Returns void

  • Parameters

    • Rest ...path: string[]

    Returns void

  • Parameters

    • params: Record<string, any>

    Returns Record<string, any>

  • Internal

    Returns Record<string, any>

  • Internal

    Returns string

  • Returns string

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