# fluri 1.0.0

Fluri is a fluent URI library built to make URI mutation easy




## Installing
```
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add 'fluri:1.0.0'
```
Published: 2015-04-29T19:37:13.517950Z
Expected archive SHA-256: 5d57ff7ecba3417fa5b7ae6489086974b5cdfcb0cd2c5dd710e328447a19002b

Available in cache; verification: upstream_checksum
## Direct dependencies

## Package README (untrusted upstream documentation)
fluri [![Build Status](https://travis-ci.org/Workiva/fluri.svg?branch=travis-ci)](https://travis-ci.org/Workiva/fluri)
=====

> Fluri is a fluent URI library for Dart built to make URI mutation easy.

The `dart:core.Uri` class provides an immutable representation of URIs, which makes it difficult to incrementally build
them or update them at a later time. If you wanted to build a long URI from the individual pieces, you would do something like this:

```dart
Uri uri = new Uri(
  scheme: 'https',
  host: 'example.com',
  path: 'path/to/resource'
);
```

If you later wanted to update the path and add a query parameter, you'd have to do this:

```dart
uri = uri.replace(
  path: 'new/path',
  query: 'foo=true'
);
```

Now let's say you want update the query without losing what you already have:

```dart
Map query = new Map.from(uri.queryParameters);
query['bar'] = '10';
uri = uri.replace(queryParameters: query);
```

As you can see, incremental or fluent-style URI mutations become a hassle with the core `Uri` class.

With fluri, the above interactions are easy:

```dart
import 'package:fluri/fluri.dart';

Fluri uri = new Fluri()
  ..scheme = 'https'
  ..host = 'example.com'
  ..path = 'path/to/resource';

uri
  ..path = 'new/path'
  ..query = 'foo=true';

uri.updateQuery({'bar': '10'});
```
## Changelog







 
