diff --git a/src/content/tutorials/server/fetch-data.md b/src/content/tutorials/server/fetch-data.md index 161bce3091..ce19774fde 100644 --- a/src/content/tutorials/server/fetch-data.md +++ b/src/content/tutorials/server/fetch-data.md @@ -40,6 +40,21 @@ as well as Dart's JSON support in the [`dart:convert`][convert-docs] library to fetch, decode, then use JSON-formatted data retrieved from an HTTP server. +{{site.alert.secondary}} + Two other packages exist with platform-specific implementations for mobile. + + * [cronet_http]({{site.pub-pkg}}/cronet_http) + provides access to the Android [Cronet][] HTTP client. + * [cupertino_http]({{site.pub-pkg}}/cupertino_http) + provides access to Apple's [Foundation URL Loading System][furl]. + + To learn more about their capabilities, + consult the package documentation. + +{{site.alert.end}} + +[Cronet]: {{site.android-dev}}guide/topics/connectivity/cronet/reference/org/chromium/net/package-summary +[furl]: {{site.apple-dev}}/documentation/foundation/url_loading_system [JSON]: https://www.json.org/ ## Background concepts @@ -133,13 +148,6 @@ The `package:http` library provides a cross-platform solution for making composable HTTP requests, with optional fine-grained control. -:::note -You should avoid directly using `dart:io` or `dart:html` -to make HTTP requests. -Those libraries are platform-dependent -and tied to a single implementation. -::: - To add a dependency on `package:http`, run the following [`dart pub add`][] command from the top of your repo: diff --git a/src/content/tutorials/server/httpserver.md b/src/content/tutorials/server/httpserver.md index 14e621d957..a6f5ffd9df 100644 --- a/src/content/tutorials/server/httpserver.md +++ b/src/content/tutorials/server/httpserver.md @@ -9,13 +9,6 @@ prevpage: Dart resources for writing HTTP servers include: -## Packages - -* [cronet_http]({{site.pub-pkg}}/cronet_http) - Provides access to the Android [Cronet][] HTTP client. -* [cupertino_http]({{site.pub-pkg}}/cupertino_http) - Provides access to Apple's [Foundation URL Loading System][furl]. - ## Documentation * [Using Google Cloud][] has information on Google Cloud products @@ -44,6 +37,3 @@ Dart resources for writing HTTP servers include: [simple-sample]: https://github.com/dart-lang/samples/tree/main/server/simple [Using Google APIs]: /guides/google-apis [Using Google Cloud]: /server/google-cloud - -[Cronet]: {{site.android-dev}}guide/topics/connectivity/cronet/reference/org/chromium/net/package-summary -[furl]: {{site.apple-dev}}/documentation/foundation/url_loading_system