HttpResponseMessage Interface

public interface HttpResponseMessage

An HttpResponseMessage instance is returned by Azure Functions methods that are triggered by an HttpTrigger.

Method Summary

Modifier and Type Method and Description
abstract java.lang.Object getBody()

Returns the body of the HTTP response.

abstract java.lang.String getHeader(String key)

Returns a header value for the given key.

abstract HttpStatusType getStatus()

Returns the HTTP status code set on the HttpResponseMessage instance.

default int getStatusCode()

Returns the HTTP status code set on the HttpResponseMessage instance.

Method Details

getBody

public abstract Object getBody()

Returns the body of the HTTP response.

Returns:

the body of the HTTP response.

getHeader

public abstract String getHeader(String key)

Returns a header value for the given key.

Parameters:

key - The key for which the header value is sought.

Returns:

Returns the value if the key has previously been added, or null if it has not.

getStatus

public abstract HttpStatusType getStatus()

Returns the HTTP status code set on the HttpResponseMessage instance.

Returns:

the status code set on the HttpResponseMessage instance.

getStatusCode

public default int getStatusCode()

Returns the HTTP status code set on the HttpResponseMessage instance.

Returns:

the status code set on the HttpResponseMessage instance.

Applies to