CoapResponse.fromParsed constructor

CoapResponse.fromParsed(
  1. ResponseCode responseCode, {
  2. required CoapMessageType type,
  3. required int id,
  4. required Uint8Buffer token,
  5. required List<Option<Object?>> options,
  6. required Uint8Buffer? payload,
  7. required bool hasUnknownCriticalOption,
  8. required bool hasFormatError,
  9. Uri? location,
})

Implementation

CoapResponse.fromParsed(
  this.responseCode, {
  required final CoapMessageType type,
  required final int id,
  required final Uint8Buffer token,
  required final List<Option<Object?>> options,
  required final Uint8Buffer? payload,
  required final bool hasUnknownCriticalOption,
  required final bool hasFormatError,
  final Uri? location,
})  : location = location ?? Uri(path: '/'),
      super.fromParsed(
        responseCode.coapCode,
        type,
        id: id,
        token: token,
        options: options,
        hasUnknownCriticalOption: hasUnknownCriticalOption,
        hasFormatError: hasFormatError,
        payload: payload,
      );