testing library

Classes

MockClient
A mock HTTP client designed for use when testing code that uses BaseClient. This client allows you to define a handler callback for all requests that are made through it so that you can mock a server without having to send real HTTP requests.

Typedefs

MockClientHandler(Request request) Future<Response>
A handler function that receives Requests and sends Responses. Note that request will be finalized.
MockClientStreamHandler(BaseRequest request, ByteStream bodyStream) Future<StreamedResponse>
A handler function that receives StreamedRequests and sends StreamedResponses. Note that request will be finalized.