你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
HttpRequestMessage<T> Interface
Type Parameters
- T
The type of the body content that is expected to be received as part of this HTTP request.
public interface HttpRequestMessage
An HttpRequestMessage instance is provided to Azure functions that use HttpTrigger. For an example of how to use the http functionality of Azure Functions, refer to the example in the HttpTrigger
Method Summary
Modifier and Type | Method and Description |
---|---|
abstract Builder |
createResponseBuilder(HttpStatus status)
Returns a HttpResponseMessage.Builder instance to build a Http |
abstract Builder |
createResponseBuilder(HttpStatusType status)
Returns a HttpResponseMessage.Builder instance to build a Http |
abstract T |
getBody()
Returns any body content that was included with this HTTP request. |
abstract java.util.Map<java.lang.String,java.lang.String> |
getHeaders()
Returns a map of headers that were contained within this HTTP request. |
abstract
Http |
getHttpMethod()
Returns the HTTP method name as Enum |
abstract java.util.Map<java.lang.String,java.lang.String> |
getQueryParameters()
Returns a map of query parameters that were included with this HTTP request. |
abstract java.net.URI |
getUri()
Returns the URI that was called that resulted in this HTTP request being submitted. |
Method Details
createResponseBuilder
public abstract HttpResponseMessage.Builder createResponseBuilder(HttpStatus status)
Returns a HttpResponseMessage.Builder instance to build a HttpResponseMessage with standard HTTP status code and no response body.
Parameters:
Returns:
createResponseBuilder
public abstract HttpResponseMessage.Builder createResponseBuilder(HttpStatusType status)
Returns a HttpResponseMessage.Builder instance to build a HttpResponseMessage with custome HTTP status code and no response body.
Parameters:
Returns:
getBody
public abstract T getBody()
Returns any body content that was included with this HTTP request.
Returns:
getHeaders
public abstract Map
Returns a map of headers that were contained within this HTTP request.
Returns:
getHttpMethod
public abstract HttpMethod getHttpMethod()
Returns the HTTP method name as Enum
Returns:
getQueryParameters
public abstract Map
Returns a map of query parameters that were included with this HTTP request.
Returns:
getUri
public abstract URI getUri()
Returns the URI that was called that resulted in this HTTP request being submitted.
Returns: