CoapRequest constructor

CoapRequest(
  1. Uri uri,
  2. RequestMethod method, {
  3. bool confirmable = true,
  4. Iterable<int>? payload,
  5. CoapMediaType? accept,
  6. CoapMediaType? contentFormat,
})

Initializes a request message. Defaults to confirmable

Implementation

CoapRequest(
  this.uri,
  this.method, {
  final bool confirmable = true,
  super.payload,
  final CoapMediaType? accept,
  super.contentFormat,
}) : super(
        method.coapCode,
        confirmable ? CoapMessageType.con : CoapMessageType.non,
      ) {
  super.accept = accept;
}