Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thomasthiebaud/base_uri
A tiny wrapper around Uri to easily define a base uri. Supports api versions.
https://github.com/thomasthiebaud/base_uri
baseurl dart http uri
Last synced: 19 days ago
JSON representation
A tiny wrapper around Uri to easily define a base uri. Supports api versions.
- Host: GitHub
- URL: https://github.com/thomasthiebaud/base_uri
- Owner: thomasthiebaud
- License: bsd-2-clause
- Created: 2021-03-18T13:52:54.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-06-08T12:11:38.000Z (over 3 years ago)
- Last Synced: 2024-10-03T08:11:07.199Z (about 1 month ago)
- Topics: baseurl, dart, http, uri
- Language: Dart
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# base_uri
A tiny wrapper around Uri to easily define a base uri. Supports api versions.
## Getting Started
Create a base Uri
```
final BASE_URI = BaseUri(
scheme: 'https',
host: 'example.com',
version: 'v1',
);
```then use it accross your app
```
BASE_URI.useWith('/path'); // https://example.com/v1/path
BASE_URI.useWith('/path', queryParameters: {'test': 'yes'}); // https://example.com/v1/path?test=yes
```