Package-level declarations
Types
Asserts equality between two HttpRequest instances. Implementations of this interface are free to choose criteria for the equality assertion.
DSL builder for TestConnection
An expected HttpRequest with the response that should be returned by the engine
An HttpClientEngine implementation that can be used to record requests and responses from a "live" connection by wrapping an existing engine. This is useful for capturing actual responses from a service, dumping them to json via toJson and then later being able to replay them as part of a test connection (see TestConnection.fromJson).
Actual and expected HttpRequest pair
TestConnection implements aws.smithy.kotlin.runtime.http.engine.HttpClientEngine with canned responses. For each expected request it will capture the actual and respond with the pre-configured response (or a basic 200-OK with an empty body if none was configured).
Spin up a local server using ktor-server to test real requests against. This can used in integration tests where mocking an HTTP client engine is difficult.
Functions
Invoke block with the given builder and construct a new TestConnection
A simplistic HttpClientEngine suitable for integration testing. This engine yields a hardcoded HttpClientEngineConfig.Default for its configuration.