transformRequest method

  1. @override
Future<Map<String, dynamic>> transformRequest(
  1. HttpAgentRequest request
)
override

Transform a request into a signed version of the request. This is done last after the transforms on the body of a request. The returned object can be anything, but must be serializable to CBOR.

Implementation

@override
Future<Map<String, dynamic>> transformRequest(HttpAgentRequest request) {
  return Future.value({
    ...request.toJson(),
    "body": {"content": request.body.toJson()}
  });
}