public abstract class TestHttpClients extends Object
| Constructor and Description |
|---|
TestHttpClients() |
| Modifier and Type | Method and Description |
|---|---|
static TestHttpClient |
testHttpClient(ApplicationUnderTest applicationUnderTest) |
static TestHttpClient |
testHttpClient(ApplicationUnderTest applicationUnderTest,
Action<? super RequestSpec> requestConfigurer) |
public static TestHttpClient testHttpClient(ApplicationUnderTest applicationUnderTest)
applicationUnderTest - Which Ratpack application to make requests against.TestHttpClient which is configured to make requests against the provided ApplicationUnderTestpublic static TestHttpClient testHttpClient(ApplicationUnderTest applicationUnderTest, @Nullable Action<? super RequestSpec> requestConfigurer)
applicationUnderTest - Which Ratpack application to make requests against.requestConfigurer - A Action that will set up the RequestSpec for all requests made through this instance of TestHttpClient. These settings can be overridden on a per request basis via TestHttpClient.requestSpec(ratpack.func.Action<? super ratpack.http.client.RequestSpec>).TestHttpClient which is configured to make requests against the provided ApplicationUnderTest