get method

Future<CoapResponse> get(
  1. Uri uri, {
  2. CoapMediaType? accept,
  3. bool confirmable = true,
  4. List<Option<Object?>>? options,
  5. bool earlyBlock2Negotiation = false,
  6. int maxRetransmit = 0,
  7. CoapMulticastResponseHandler? onMulticastResponse,
})

Sends a GET request.

Implementation

Future<CoapResponse> get(
  final Uri uri, {
  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.get(uri, confirmable: confirmable, accept: accept);
  _build(
    request,
    options,
    earlyBlock2Negotiation,
    maxRetransmit,
  );
  return send(request, onMulticastResponse: onMulticastResponse);
}