base_uri 0.1.1 copy "base_uri: ^0.1.1" to clipboard
base_uri: ^0.1.1 copied to clipboard

outdated

A tiny wrapper around Uri to easily define a base uri that is reusable for all your endpoints. It also adds a version parameter.

example/main.dart

import 'package:base_uri/base_uri.dart';

void main() {
  final BASE_URI = BaseUri(
    scheme: 'https',
    host: 'example.com',
    version: 'v1',
  );

  // https://example.com/v1/path
  BASE_URI.useWith('/path');

  // https://example.com/v1/path?test=yes
  BASE_URI.useWith('/path', queryParameters: {'test': 'yes'});
}
0
likes
40
pub points
0%
popularity

Publisher

unverified uploader

A tiny wrapper around Uri to easily define a base uri that is reusable for all your endpoints. It also adds a version parameter.

Repository (GitHub)
View/report issues

License

BSD-2-Clause (license)

More

Packages that depend on base_uri