get method

Future<AlphaXResponse> get(
  1. String path, {
  2. Map<String, Object?>? queryParameters,
  3. Map<String, String>? headers,
  4. Duration? timeout,
  5. AlphaXCancellationToken? cancellationToken,
})

Sends a GET request to path.

path may be a relative target such as /users or an absolute HTTP(S) URL. queryParameters accepts strings, numbers, booleans, and iterables of those scalar values. A supplied timeout overrides the client default and represents the overall AlphaX timeout only.

Implementation

Future<AlphaXResponse> get(
  String path, {
  Map<String, Object?>? queryParameters,
  Map<String, String>? headers,
  Duration? timeout,
  AlphaXCancellationToken? cancellationToken,
}) => _send(
  HttpMethod.get,
  path,
  queryParameters: queryParameters,
  headers: headers,
  timeout: timeout,
  cancellationToken: cancellationToken,
);