putBytes method
Future<CoapResponse>
putBytes(
- String path, {
- required Uint8Buffer payload,
- CoapMediaType? format,
- MatchEtags matchEtags = MatchEtags.onMatch,
- List<
Uint8Buffer> ? etags, - CoapMediaType? accept,
- bool confirmable = true,
- List<
Option< ? options,Object?> > - bool earlyBlock2Negotiation = false,
- int maxRetransmit = 0,
- CoapMulticastResponseHandler? onMulticastResponse,
Sends a PUT request with the specified byte payload.
Implementation
Future<CoapResponse> putBytes(
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<Option<Object?>>? options,
final bool earlyBlock2Negotiation = false,
final int maxRetransmit = 0,
final CoapMulticastResponseHandler? onMulticastResponse,
}) {
final request = CoapRequest.newPut(confirmable: confirmable)
..setPayloadMediaRaw(payload, format);
_build(
request,
path,
accept,
options,
earlyBlock2Negotiation,
maxRetransmit,
etags: etags,
matchEtags: matchEtags,
);
return send(request, onMulticastResponse: onMulticastResponse);
}