Package io.micronaut.gcp.function.http
Interface GoogleHttpResponse
- All Superinterfaces:
com.google.cloud.functions.HttpResponse
public interface GoogleHttpResponse
extends com.google.cloud.functions.HttpResponse
Extended interface used for testing.
- Since:
- 2.0.0
- Author:
- graemerocher
-
Method Summary
Methods inherited from interface com.google.cloud.functions.HttpResponse
appendHeader, getContentType, getHeaders, getOutputStream, getWriter, setContentType, setStatusCode, setStatusCode
-
Method Details
-
getStatusCode
int getStatusCode()- Returns:
- The status code
-
getHttpHeaders
io.micronaut.http.HttpHeaders getHttpHeaders()- Returns:
- The headers
-
getBodyAsText
String getBodyAsText()- Returns:
- The body as text
-
getBodyAsBytes
byte[] getBodyAsBytes()- Returns:
- The body as bytes
-
getBody
- Type Parameters:
T
- The body type- Parameters:
type
- The type required- Returns:
- The body as the given type
-
getMessage
- Returns:
- The status message
-
getStatus
default io.micronaut.http.HttpStatus getStatus()- Returns:
- The HTTP status
-