public class ODataRequest extends Object
Constructor and Description |
---|
ODataRequest() |
Modifier and Type | Method and Description |
---|---|
void |
addHeader(String name,
List<String> values)
Adds a header to the request.
|
InputStream |
getBody()
Gets the body of the request.
|
String |
getHeader(String name)
Gets first header value for a given name.
|
List<String> |
getHeaders(String name)
Gets header value for a given name.
|
HttpMethod |
getMethod()
Gets the HTTP method.
|
String |
getRawBaseUri()
Gets the base URI.
|
String |
getRawODataPath()
Gets the path segments of the request URI that belong to OData.
|
String |
getRawQueryPath()
Gets the query part of the request URI.
|
String |
getRawRequestUri()
Gets the total request URI.
|
String |
getRawServiceResolutionUri()
Gets the URI part responsible for service resolution.
|
void |
setBody(InputStream body)
Sets the body of the request.
|
void |
setMethod(HttpMethod method)
Sets the HTTP method.
|
void |
setRawBaseUri(String rawBaseUri)
Sets the base URI.
|
void |
setRawODataPath(String rawODataPath)
Sets the path segments of the request URI that belong to OData.
|
void |
setRawQueryPath(String rawQueryPath)
Sets the query part of the request URI.
|
void |
setRawRequestUri(String rawRequestUri)
Sets the total request URI.
|
void |
setRawServiceResolutionUri(String rawServiceResolutionUri)
Sets the URI part responsible for service resolution.
|
public HttpMethod getMethod()
public void setMethod(HttpMethod method)
method
- the HTTP method (GET, PUT, POST ...)public void addHeader(String name, List<String> values)
Adds a header to the request.
The header name will be handled as case-insensitive key.
If a header already exists then the list of values will just be extended.
name
- case-insensitive header namevalues
- list of values for the given header namepublic List<String> getHeaders(String name)
name
- the header name as a case-insensitive keypublic String getHeader(String name)
name
- the header name as a case-insensitive keypublic InputStream getBody()
InputStream
or nullpublic void setBody(InputStream body)
body
- the request payload as InputStream
public String getRawQueryPath()
$format=json,$top=10
"public void setRawQueryPath(String rawQueryPath)
getRawQueryPath()
public String getRawBaseUri()
http://localhost/my%20service
"public void setRawBaseUri(String rawBaseUri)
getRawBaseUri()
public String getRawRequestUri()
http://localhost/my%20service/sys1/Employees?$format=json
"public void setRawRequestUri(String rawRequestUri)
getRawRequestUri()
public String getRawODataPath()
public void setRawODataPath(String rawODataPath)
getRawODataPath()
public String getRawServiceResolutionUri()
sys1
"public void setRawServiceResolutionUri(String rawServiceResolutionUri)
getRawServiceResolutionUri()
Copyright © 2013–2015 The Apache Software Foundation. All rights reserved.