# About use of http package in Chapter 12 Futures

**URL:** <https://forums.kodeco.com/t/about-use-of-http-package-in-chapter-12-futures/184909>\
**Category:** Dart Apprentice: Beyond the Basics\
**Created:** [March 9, 2023, 7:20am UTC](https://forums.kodeco.com/t/about-use-of-http-package-in-chapter-12-futures/184909 "2023-03-09T07:20:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ellery](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/ellery/32/110937_2.png) [@ellery](https://forums.kodeco.com/u/ellery)\
**Post date:** [March 9, 2023, 7:20am UTC](https://forums.kodeco.com/t/about-use-of-http-package-in-chapter-12-futures/184909/1 "2023-03-09T07:20:24Z")

</div>

In Chapter 12 Futures, is `http` a third party package developed by someone else. Therefore we need to add the line `http: ^0.13.5` in the dependencies section in the **pubspec.yaml** file?

This syntax will specify Dart to load `http` package version 0.13.5 explicitly, am I correct? Is there any syntax that will tell Dart to load the whatever latest version of `http` possible?

---

<div class="post-metadata">

**Author:** ![suragch](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/suragch/32/109020_2.png) [@suragch](https://forums.kodeco.com/u/suragch)\
**Post date:** [March 9, 2023, 8:29am UTC](https://forums.kodeco.com/t/about-use-of-http-package-in-chapter-12-futures/184909/2 "2023-03-09T08:29:50Z")

</div>

Because a `^` caret precedes the version number in `^0.13.5`, the meaning is to use any version from `0.13.5` up to (but not including) `0.14.0`. See [this link](https://stackoverflow.com/questions/53563079/what-is-the-caret-sign-before-the-dependency-version-number-in-flutters-pub) for more info.

If you want to use the latest available version, leave the version blank or use the `any` key word. Like this:

```yaml
dependencies
  http: 

```

Or this:

```yaml
dependencies
  http: any

```

For example projects this is fine, but for production it can be dangerous. Say the developer makes a breaking change right before you are ready to publish your app. Then your app is broken and you have to fix it before publishing. Or worse yet, you don’t notice the breaking change and your broken app ships to the users.

Or take this book as an example. If I wrote `any` and then the next major version of `http` worked in a completely different way, all of my examples would be broken and readers would be frustrated. By specifying a non-breaking version range, I can be sure that the examples will work the same for a long time to come.

See also:

- [Package dependencies | Dart](https://dart.dev/tools/pub/dependencies#version-constraints)
- [https://semver.org/](https://semver.org/)

---

<div class="post-metadata">

**Author:** ![ellery](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/ellery/32/110937_2.png) [@ellery](https://forums.kodeco.com/u/ellery)\
**Post date:** [March 9, 2023, 12:10pm UTC](https://forums.kodeco.com/t/about-use-of-http-package-in-chapter-12-futures/184909/3 "2023-03-09T12:10:43Z")

</div>

Hi @suragch thank you. I somewhat remember book 1 has talked about this but don’t remember very clearly.
