openResponse abstract method

Future<Opened> openResponse(
  1. Uint8List body, {
  2. required CallBinding binding,
  3. required Uint8List sealedRequest,
  4. required int status,
  5. String? responsePayloadType,
})

Opens the response body to sealedRequest (the exact bytes that were sent), which came back with HTTP status.

responsePayloadType is the response's Cratestack-Payload-Type header (null when absent, which means CBOR). It must be one of CallBinding.payloadAccept; Opened.payloadType reports it.

Throws CoseRejected for every failed check, whatever failed, a response type the call did not accept included.

Implementation

Future<Opened> openResponse(
  Uint8List body, {
  required CallBinding binding,
  required Uint8List sealedRequest,
  required int status,
  String? responsePayloadType,
});