delete method

Future<CoapResponse> delete(
  1. String path, {
  2. CoapMediaType? accept,
  3. bool confirmable = true,
  4. List<CoapOption>? options,
  5. bool earlyBlock2Negotiation = false,
  6. int maxRetransmit = 0,
  7. CoapMulticastResponseHandler? onMulticastResponse,
})

Sends a DELETE request

Implementation

Future<CoapResponse> delete(
  final String path, {
  final CoapMediaType? accept,
  final bool confirmable = true,
  final List<CoapOption>? options,
  final bool earlyBlock2Negotiation = false,
  final int maxRetransmit = 0,
  final CoapMulticastResponseHandler? onMulticastResponse,
}) {
  final request = CoapRequest.newDelete(confirmable: confirmable);
  _build(
    request,
    path,
    accept,
    options,
    earlyBlock2Negotiation,
    maxRetransmit,
  );
  return send(request, onMulticastResponse: onMulticastResponse);
}