org.apache.olingo.client.api.communication.request

## Interface ODataRequest

- All Known Subinterfaces:
    EdmMetadataRequest, ODataBasicRequest<T>, ODataBatchableRequest, ODataBatchRequest, ODataDeleteRequest, ODataDeltaRequest, ODataEntityCreateRequest<E>, ODataEntityRequest<E>, ODataEntitySetIteratorRequest<ES,E>, ODataEntitySetRequest<ES>, ODataEntityUpdateRequest<E>, ODataInvokeRequest<T>, ODataMediaEntityCreateRequest<E>, ODataMediaEntityUpdateRequest<E>, ODataMediaRequest, ODataPropertyRequest<T>, ODataPropertyUpdateRequest, ODataRawRequest, ODataReferenceAddingRequest, ODataRetrieveRequest<T>, ODataServiceDocumentRequest, ODataStreamedEntityRequest<V,T>, ODataStreamedRequest<V,T>, ODataStreamUpdateRequest, ODataValueRequest, ODataValueUpdateRequest, XMLMetadataRequest

      public interface ODataRequest

  Abstract representation of an OData request. Get instance by using factories.
  See Also:
    `CUDRequestFactory`, `BatchRequestFactory`, `InvokeRequestFactory`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `ODataRequest` | `addCustomHeader(String name, String value)` Adds a custom OData request header.
    `String` | `getAccept()` Gets `Accept` OData request header.
    `String` | `getContentType()` Gets `contentType` OData request header.
    `String` | `getHeader(String name)` Gets the value of the OData request header identified by the given name.
    `Collection<String>` | `getHeaderNames()` Gets all OData request header names.
    `org.apache.http.client.methods.HttpUriRequest` | `getHttpRequest()` Returns Http request Object.
    `String` | `getIfMatch()` Gets `If-Match` OData request header.
    `String` | `getIfNoneMatch()` Gets `If-None-Match` OData request header.
    `HttpMethod` | `getMethod()` Returns HTTP request method.
    `String` | `getPrefer()` Gets `Prefer` OData request header.
    `URI` | `getURI()` Returns OData request target URI.
    `InputStream` | `rawExecute()` Request raw execute.
    `ODataRequest` | `setAccept(String value)` Adds `Accept` OData request header.
    `ODataRequest` | `setContentType(String value)` Adds `contentType` OData request header.
    `ODataRequest` | `setIfMatch(String value)` Adds `If-Match` OData request header.
    `ODataRequest` | `setIfNoneMatch(String value)` Adds `If-None-Match` OData request header.
    `ODataRequest` | `setPrefer(String value)` Adds `Prefer` OData request header.
    `void` | `setURI(URI uri)` Sets OData request target URI.
    `ODataRequest` | `setXHTTPMethod(String value)` Adds `X-HTTP-METHOD` OData request header.
    `byte[]` | `toByteArray()` Gets byte array representation of the full request header.

- - ### Method Detail

    - #### getURI

          URI getURI()

      Returns OData request target URI.
      Returns:
        OData request target URI.

    - #### getHttpRequest

          org.apache.http.client.methods.HttpUriRequest getHttpRequest()

      Returns Http request Object.
      Returns:
        HttpUriRequest.

    - #### setURI

          void setURI(URI uri)

      Sets OData request target URI.
      Parameters:
        `uri` - target URI.

    - #### getMethod

          HttpMethod getMethod()

      Returns HTTP request method.
      Returns:
        HTTP request method.

    - #### getHeaderNames

          Collection<String> getHeaderNames()

      Gets all OData request header names.
      Returns:
        all request header names.

    - #### getHeader

          String getHeader(String name)

      Gets the value of the OData request header identified by the given name.
      Parameters:
        `name` - name of the OData request header to be retrieved.
      Returns:
        header value.

    - #### setAccept

          ODataRequest setAccept(String value)

      Adds `Accept` OData request header.
      Parameters:
        `value` - header value.
      Returns:
        current object
      See Also:
        `HttpHeader.ACCEPT`

    - #### getAccept

          String getAccept()

      Gets `Accept` OData request header.
      Returns:
        header value.
      See Also:
        `HttpHeader.ACCEPT`

    - #### setIfMatch

          ODataRequest setIfMatch(String value)

      Adds `If-Match` OData request header.
      Parameters:
        `value` - header value.
      Returns:
        current object
      See Also:
        `HttpHeader.IF_MATCH`

    - #### getIfMatch

          String getIfMatch()

      Gets `If-Match` OData request header.
      Returns:
        header value.
      See Also:
        `HttpHeader.IF_MATCH`

    - #### setIfNoneMatch

          ODataRequest setIfNoneMatch(String value)

      Adds `If-None-Match` OData request header.
      Parameters:
        `value` - header value.
      Returns:
        current object
      See Also:
        `HttpHeader.IF_NONE_MATCH`

    - #### getIfNoneMatch

          String getIfNoneMatch()

      Gets `If-None-Match` OData request header.
      Returns:
        header value.
      See Also:
        `HttpHeader.IF_NONE_MATCH`

    - #### setPrefer

          ODataRequest setPrefer(String value)

      Adds `Prefer` OData request header.
      Parameters:
        `value` - header value.
      Returns:
        current object
      See Also:
        `HttpHeader.PREFER`

    - #### getPrefer

          String getPrefer()

      Gets `Prefer` OData request header.
      Returns:
        header value.
      See Also:
        `HttpHeader.PREFER`

    - #### setContentType

          ODataRequest setContentType(String value)

      Adds `contentType` OData request header.
      Parameters:
        `value` - header value.
      Returns:
        current object
      See Also:
        `HttpHeader.CONTENT_TYPE`

    - #### getContentType

          String getContentType()

      Gets `contentType` OData request header.
      Returns:
        header value.
      See Also:
        `HttpHeader.CONTENT_TYPE`

    - #### setXHTTPMethod

          ODataRequest setXHTTPMethod(String value)

      Adds `X-HTTP-METHOD` OData request header.
      Parameters:
        `value` - header value.
      Returns:
        current object
      See Also:
        `HttpHeader.X_HTTP_METHOD`

    - #### addCustomHeader

          ODataRequest addCustomHeader(String name,
                                       String value)

      Adds a custom OData request header.
      Parameters:
        `name` - header name.
        `value` - header value.
      Returns:
        current object

    - #### toByteArray

          byte[] toByteArray()

      Gets byte array representation of the full request header.
      Returns:
        full request header.

    - #### rawExecute

          InputStream rawExecute()

      Request raw execute.
      Returns:
        raw input stream response.

Copyright © 2013–2020 The Apache Software Foundation. All rights reserved.