public final class MockHttpClient extends Object implements SdkHttpClient
SdkHttpClient.SdkHttpClient.Builder<T extends SdkHttpClient.Builder<T>>| Constructor and Description |
|---|
MockHttpClient() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
SdkHttpRequest |
getLastRequest() |
ExecutableHttpRequest |
prepareRequest(HttpExecuteRequest request)
Create a
ExecutableHttpRequest that can be used to execute the HTTP request. |
void |
reset()
Resets this mock by clearing any captured requests and wiping any stubbed responses.
|
void |
stubNextResponse(HttpExecuteResponse nextResponse)
Sets up the next HTTP response that will be returned by the mock.
|
public ExecutableHttpRequest prepareRequest(HttpExecuteRequest request)
SdkHttpClientExecutableHttpRequest that can be used to execute the HTTP request.prepareRequest in interface SdkHttpClientrequest - Representation of an HTTP request.public void close()
SdkAutoCloseableclose in interface AutoCloseableclose in interface SdkAutoCloseablepublic void reset()
public void stubNextResponse(HttpExecuteResponse nextResponse)
nextResponse - Next SdkHttpFullResponse to return from
prepareRequest(HttpExecuteRequest)public SdkHttpRequest getLastRequest()
IllegalStateException - If no requests have been captured.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.