postJson method
Sends a POST request with JSON body and optional auth.
Implementation
Future<TestResponse> postJson(
String path,
Object body, {
String? token,
Map<String, String>? headers,
}) => post(
path,
body: body,
headers: RequestHelper.mergeHeaders(
RequestHelper.jsonHeaders,
token != null ? AuthHelper.bearer(token) : {},
headers ?? {},
),
);