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

    Modifier and Type
    Method
    Description
    <T> Optional<T>
    getBody(io.micronaut.core.type.Argument<T> type)
     
    byte[]
     
     
    io.micronaut.http.HttpHeaders
     
    @Nullable String
     
    default io.micronaut.http.HttpStatus
     
    int
     

    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

      <T> Optional<T> getBody(io.micronaut.core.type.Argument<T> type)
      Type Parameters:
      T - The body type
      Parameters:
      type - The type required
      Returns:
      The body as the given type
    • getMessage

      @Nullable @Nullable String getMessage()
      Returns:
      The status message
    • getStatus

      default io.micronaut.http.HttpStatus getStatus()
      Returns:
      The HTTP status