@Beta public static class MockHttpTransport.Builder extends Object
| Constructor and Description |
|---|
Builder()
Constructs a new
MockHttpTransport.Builder. |
public Builder()
MockHttpTransport.Builder. Note that this constructor was protected in version
1.17 and its predecessors, and was made public in version 1.18.public MockHttpTransport build()
MockHttpTransport.public final Set<String> getSupportedMethods()
null to specify that all methods are supported.public final MockHttpTransport.Builder setSupportedMethods(Set<String> supportedMethods)
null to specify that all methods are supported.public final MockHttpTransport.Builder setLowLevelHttpRequest(MockLowLevelHttpRequest lowLevelHttpRequest)
MockLowLevelHttpRequest that will be returned by MockHttpTransport.buildRequest(java.lang.String, java.lang.String), if
non-null. If null, MockHttpTransport.buildRequest(java.lang.String, java.lang.String) will create a new MockLowLevelHttpRequest arguments.
Note that the user can set a low level HTTP Request only if a low level HTTP response has not been set on this instance.
public final MockLowLevelHttpRequest getLowLevelHttpRequest()
MockLowLevelHttpRequest that is associated with this MockHttpTransport.Builder, or
null if no such instance exists.public final MockHttpTransport.Builder setLowLevelHttpResponse(MockLowLevelHttpResponse lowLevelHttpResponse)
MockLowLevelHttpResponse that will be the result when the MockLowLevelHttpRequest returned by MockHttpTransport.buildRequest(java.lang.String, java.lang.String) is executed. Note that the
response can be set only the caller has not provided a MockLowLevelHttpRequest via
setLowLevelHttpRequest(com.google.api.client.testing.http.MockLowLevelHttpRequest).IllegalStateException - if the caller has already set a LowLevelHttpRequest in
this instanceCopyright © 2011–2025 Google. All rights reserved.