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

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      <T> java.util.Optional<T> getBody​(io.micronaut.core.type.Argument<T> type)  
      java.lang.String getBodyAsText()  
      io.micronaut.http.HttpHeaders getHttpHeaders()  
      java.lang.String getMessage()  
      default io.micronaut.http.HttpStatus getStatus()  
      int getStatusCode()  
      • Methods inherited from interface com.google.cloud.functions.HttpResponse

        appendHeader, getContentType, getHeaders, getOutputStream, getWriter, setContentType, setStatusCode, setStatusCode
    • Method Detail

      • getStatusCode

        int getStatusCode()
        Returns:
        The status code
      • getHttpHeaders

        io.micronaut.http.HttpHeaders getHttpHeaders()
        Returns:
        The headers
      • getBodyAsText

        java.lang.String getBodyAsText()
        Returns:
        The body as text
      • getBody

        <T> java.util.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
        java.lang.String getMessage()
        Returns:
        The status message
      • getStatus

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