patchBytes method
Future<CoapResponse>
patchBytes(
- String path, {
- required Uint8Buffer payload,
- CoapMediaType? format,
- MatchEtags matchEtags = MatchEtags.onMatch,
- List<
Uint8Buffer> ? etags, - CoapMediaType? accept,
- bool confirmable = true,
- List<
CoapOption> ? options, - bool earlyBlock2Negotiation = false,
- int maxRetransmit = 0,
- CoapMulticastResponseHandler? onMulticastResponse,
Sends a PATCH request with the specified byte payload.
See RFC 8132, section 3.
Implementation
Future<CoapResponse> patchBytes(
final String path, {
required final Uint8Buffer payload,
final CoapMediaType? format,
final MatchEtags matchEtags = MatchEtags.onMatch,
final List<Uint8Buffer>? etags,
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.newPatch(confirmable: confirmable)
..setPayloadMediaRaw(payload, format);
_build(
request,
path,
accept,
options,
earlyBlock2Negotiation,
maxRetransmit,
etags: etags,
matchEtags: matchEtags,
);
return send(request, onMulticastResponse: onMulticastResponse);
}