Class MockLowLevelHttpResponse

java.lang.Object
com.google.api.client.http.LowLevelHttpResponse
com.google.api.client.testing.http.MockLowLevelHttpResponse

@Beta public class MockLowLevelHttpResponse extends LowLevelHttpResponse
Beta
Mock for LowLevelHttpResponse.

Implementation is not thread-safe.

Since:
1.3
  • Field Details

    • content

      private InputStream content
      Input stream content of HTTP response or null by default.
    • contentType

      private String contentType
      Content type of HTTP response or null by default.
    • statusCode

      private int statusCode
      Status code of HTTP response or 200 by default.
    • reasonPhrase

      private String reasonPhrase
      HTTP reason phrase or null for none.
    • headerNames

      private List<String> headerNames
      List of header names of HTTP response (empty array list by default).
    • headerValues

      private List<String> headerValues
      List of header values of HTTP response (empty array list by default).
    • contentEncoding

      private String contentEncoding
      Content encoding or null for none.
    • contentLength

      private long contentLength
      Content length or -1 if unknown.
    • isDisconnected

      private boolean isDisconnected
      Whether disconnect() has been called.
  • Constructor Details

    • MockLowLevelHttpResponse

      public MockLowLevelHttpResponse()
  • Method Details