CoapResponse constructor

CoapResponse(
  1. ResponseCode responseCode,
  2. CoapMessageType type, {
  3. Uri? location,
  4. Iterable<int>? payload,
})

Initializes a response message.

Implementation

CoapResponse(
  this.responseCode,
  final CoapMessageType type, {
  final Uri? location,
  super.payload,
})  : location = location ?? Uri(path: '/'),
      super(responseCode.coapCode, type);