single<T> method

Query<T> single<T>(
  1. String path, {
  2. QueryOptions<T> options = const QueryOptions(),
  3. bool tryUseAuth = true,
})

tryUseAuth will attach Authorization information to the Headers if possible

Implementation

Query<T> single<T>(String path, {QueryOptions<T> options = const QueryOptions(), bool tryUseAuth = true}) {
  return Query<T>(
    baseUrl: baseUrl,
    path: path,
    options: options,
    cookie: tryUseAuth ? _cookie : null,
    bearer: tryUseAuth ? _bearer : null,
  );
}