fetch method
Future<CoapResponse>
fetch(
- String path, {
- CoapMediaType? accept,
- bool confirmable = true,
- List<
CoapOption> ? options, - bool earlyBlock2Negotiation = false,
- int maxRetransmit = 0,
- CoapMulticastResponseHandler? onMulticastResponse,
Sends a FETCH request.
See RFC 8132, section 2.
Implementation
Future<CoapResponse> fetch(
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.newFetch(confirmable: confirmable);
_build(
request,
path,
accept,
options,
earlyBlock2Negotiation,
maxRetransmit,
);
return send(request, onMulticastResponse: onMulticastResponse);
}