TestClientExtensions extension

Extension on TestClient for common patterns.

on

Methods

getWithAuth(String path, String token, {Map<String, String>? headers}) Future<TestResponse>

Available on TestClient, provided by the TestClientExtensions extension

Sends a GET request with Bearer authentication.
patchJson(String path, Object body, {String? token, Map<String, String>? headers}) Future<TestResponse>

Available on TestClient, provided by the TestClientExtensions extension

Sends a PATCH request with JSON body and optional auth.
postJson(String path, Object body, {String? token, Map<String, String>? headers}) Future<TestResponse>

Available on TestClient, provided by the TestClientExtensions extension

Sends a POST request with JSON body and optional auth.
putJson(String path, Object body, {String? token, Map<String, String>? headers}) Future<TestResponse>

Available on TestClient, provided by the TestClientExtensions extension

Sends a PUT request with JSON body and optional auth.