From 899655b4a13cdf43327b34e81735dacb514c106a Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Wed, 19 Jun 2024 22:10:16 -0500 Subject: [PATCH] Fix some minor spelling and grammar mistakes --- .../ISSUE_TEMPLATE/2--package-http---i-found-a-bug.md | 2 +- pkgs/cronet_http/README.md | 2 +- pkgs/cronet_http/example/lib/main.dart | 2 +- pkgs/cupertino_http/README.md | 4 ++-- pkgs/cupertino_http/example/lib/main.dart | 2 +- pkgs/cupertino_http/lib/src/cupertino_web_socket.dart | 2 +- pkgs/flutter_http_example/README.md | 2 +- pkgs/flutter_http_example/lib/main.dart | 2 +- pkgs/http/README.md | 10 +++++----- pkgs/http/lib/src/response.dart | 2 +- pkgs/http_client_conformance_tests/README.md | 2 +- .../lib/src/isolate_test.dart | 2 +- .../lib/src/request_body_tests.dart | 2 +- pkgs/web_socket/lib/src/web_socket.dart | 2 +- pkgs/web_socket_conformance_tests/README.md | 2 +- .../lib/src/protocol_tests.dart | 2 +- 16 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/2--package-http---i-found-a-bug.md b/.github/ISSUE_TEMPLATE/2--package-http---i-found-a-bug.md index 36877b515c..261f75e9ae 100644 --- a/.github/ISSUE_TEMPLATE/2--package-http---i-found-a-bug.md +++ b/.github/ISSUE_TEMPLATE/2--package-http---i-found-a-bug.md @@ -12,4 +12,4 @@ Please describe the bug and how to reproduce it. Note that if the bug can also be reproduced when going through the interfaces provided by `dart:html` or `dart:io` directly the bug should be filed against the Dart SDK: https://github.com/dart-lang/sdk/issues -A failure to make an http request is more often a problem with the environment than with the client. +A failure to make an HTTP request is more often a problem with the environment than with the client. diff --git a/pkgs/cronet_http/README.md b/pkgs/cronet_http/README.md index 321897aa21..eca84103b0 100644 --- a/pkgs/cronet_http/README.md +++ b/pkgs/cronet_http/README.md @@ -23,7 +23,7 @@ Using [Cronet][], rather than the socket-based ## Using -The easiest way to use this library is via the the high-level interface +The easiest way to use this library is via the high-level interface defined by [package:http Client][]. This approach allows the same HTTP code to be used on all platforms, while diff --git a/pkgs/cronet_http/example/lib/main.dart b/pkgs/cronet_http/example/lib/main.dart index 02c56d6581..1af8e9203f 100644 --- a/pkgs/cronet_http/example/lib/main.dart +++ b/pkgs/cronet_http/example/lib/main.dart @@ -63,7 +63,7 @@ class _HomePageState extends State { } // Get the list of books matching `query`. - // The `get` call will automatically use the `client` configurated in `main`. + // The `get` call will automatically use the `client` configured in `main`. Future> _findMatchingBooks(String query) async { final response = await _client.get( Uri.https( diff --git a/pkgs/cupertino_http/README.md b/pkgs/cupertino_http/README.md index 77c1d79244..ef5c9fff8c 100644 --- a/pkgs/cupertino_http/README.md +++ b/pkgs/cupertino_http/README.md @@ -7,7 +7,7 @@ A macOS/iOS Flutter plugin that provides access to the ## Motivation Using the [Foundation URL Loading System][], rather than the socket-based -[dart:io HttpClient][] implemententation, has several advantages: +[dart:io HttpClient][] implementation, has several advantages: 1. It automatically supports iOS/macOS platform features such VPNs and HTTP proxies. @@ -17,7 +17,7 @@ Using the [Foundation URL Loading System][], rather than the socket-based ## Using -The easiest way to use this library is via the the high-level interface +The easiest way to use this library is via the high-level interface defined by [package:http Client][]. This approach allows the same HTTP code to be used on all platforms, while diff --git a/pkgs/cupertino_http/example/lib/main.dart b/pkgs/cupertino_http/example/lib/main.dart index 092300a64c..24436ea052 100644 --- a/pkgs/cupertino_http/example/lib/main.dart +++ b/pkgs/cupertino_http/example/lib/main.dart @@ -62,7 +62,7 @@ class _HomePageState extends State { } // Get the list of books matching `query`. - // The `get` call will automatically use the `client` configurated in `main`. + // The `get` call will automatically use the `client` configured in `main`. Future> _findMatchingBooks(String query) async { final response = await _client.get( Uri.https( diff --git a/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart index 43095ff68f..d9f78ae2dc 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart @@ -84,7 +84,7 @@ class CupertinoWebSocket implements WebSocket { // called and `_connectionClosed` is a no-op. // 2. we sent a close Frame (through `close()`) and `_connectionClosed` // is a no-op. - // 3. an error occured (e.g. network failure) and `_connectionClosed` + // 3. an error occurred (e.g. network failure) and `_connectionClosed` // will signal that and close `event`. webSocket._connectionClosed( 1006, Data.fromList('abnormal close'.codeUnits)); diff --git a/pkgs/flutter_http_example/README.md b/pkgs/flutter_http_example/README.md index 1a9cf9dd8a..0877bfb81e 100644 --- a/pkgs/flutter_http_example/README.md +++ b/pkgs/flutter_http_example/README.md @@ -24,7 +24,7 @@ the Dart virtual machine, meaning all platforms except the web browser. This library used to create `package:http` `Client`s when the app is run inside a web browser. -Web configuration must be done in a seperate library because Dart code cannot +Web configuration must be done in a separate library because Dart code cannot import `dart:ffi` or `dart:io` when run in a web browser. ### `main.dart` diff --git a/pkgs/flutter_http_example/lib/main.dart b/pkgs/flutter_http_example/lib/main.dart index 548c3dee0a..21787db1bf 100644 --- a/pkgs/flutter_http_example/lib/main.dart +++ b/pkgs/flutter_http_example/lib/main.dart @@ -51,7 +51,7 @@ class _HomePageState extends State { } // Get the list of books matching `query`. - // The `get` call will automatically use the `client` configurated in `main`. + // The `get` call will automatically use the `client` configured in `main`. Future> _findMatchingBooks(String query) async { final response = await _client.get( Uri.https( diff --git a/pkgs/http/README.md b/pkgs/http/README.md index 0fe9014619..07c8208ec2 100644 --- a/pkgs/http/README.md +++ b/pkgs/http/README.md @@ -119,7 +119,7 @@ There are multiple implementations of the `package:http` [`Client`][client] inte You can change implementations without changing your application code, except for a few lines of [configuration](#2-configure-the-http-client). -Some well supported implementations are: +Some well-supported implementations are: | Implementation | Supported Platforms | SDK | Caching | HTTP3/QUIC | Platform Native | | -------------- | ------------------- | ----| ------- | ---------- | --------------- | @@ -130,7 +130,7 @@ Some well supported implementations are: | [`package:fetch_client`][fetch] — [`FetchClient`][fetchclient] | Web | Dart, Flutter | ✅︎ | ✅︎ | ✅︎ | > [!TIP] -> If you are writing a Dart package or Flutter pluggin that uses +> If you are writing a Dart package or Flutter plugin that uses > `package:http`, you should not depend on a particular [`Client`][client] > implementation. Let the application author decide what implementation is > best for their project. You can make that easier by accepting an explicit @@ -145,7 +145,7 @@ Some well supported implementations are: ## Configuration -To use a HTTP client implementation other than the default, you must: +To use an HTTP client implementation other than the default, you must: 1. Add the HTTP client as a dependency. 2. Configure the HTTP client. 3. Connect the HTTP client to the code that uses it. @@ -204,7 +204,7 @@ Client httpClient() { #### Supporting browser and native If your application can be run in the browser and natively, you must put your -browser and native configurations in seperate files and import the correct file +browser and native configurations in separate files and import the correct file based on the platform. For example: @@ -250,7 +250,7 @@ void main() { ``` In Flutter, you can use a one of many -[state mangement approaches][flutterstatemanagement]. +[state management approaches][flutterstatemanagement]. If you depend on code that uses top-level functions (e.g. `http.post`) or calls the [`Client()`][clientconstructor] constructor, then you can use diff --git a/pkgs/http/lib/src/response.dart b/pkgs/http/lib/src/response.dart index 1ba7c466cf..9d8cdb88f5 100644 --- a/pkgs/http/lib/src/response.dart +++ b/pkgs/http/lib/src/response.dart @@ -71,7 +71,7 @@ class Response extends BaseResponse { Encoding _encodingForHeaders(Map headers) => encodingForCharset(_contentTypeForHeaders(headers).parameters['charset']); -/// Returns the [MediaType] object for the given headers's content-type. +/// Returns the [MediaType] object for the given headers' content-type. /// /// Defaults to `application/octet-stream`. MediaType _contentTypeForHeaders(Map headers) { diff --git a/pkgs/http_client_conformance_tests/README.md b/pkgs/http_client_conformance_tests/README.md index 6502aaf1ea..631401f6f7 100644 --- a/pkgs/http_client_conformance_tests/README.md +++ b/pkgs/http_client_conformance_tests/README.md @@ -40,5 +40,5 @@ void main() { } ``` -**Note**: This package does not have it's own tests, instead it is +**Note**: This package does not have its own tests, instead it is exercised by the tests in `package:http`. diff --git a/pkgs/http_client_conformance_tests/lib/src/isolate_test.dart b/pkgs/http_client_conformance_tests/lib/src/isolate_test.dart index 1723ab549c..1f5559b69d 100644 --- a/pkgs/http_client_conformance_tests/lib/src/isolate_test.dart +++ b/pkgs/http_client_conformance_tests/lib/src/isolate_test.dart @@ -17,7 +17,7 @@ Future _testPost(Client Function() clientFactory, String host) async { () => clientFactory().post(Uri.http(host, ''), body: 'Hello World!')); } -/// Tests that the [Client] is useable from Isolates other than the main +/// Tests that the [Client] is usable from Isolates other than the main /// isolate. /// /// If [canWorkInIsolates] is `false` then the tests will be skipped. diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart index 901f7f7ed5..98da3785a3 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart @@ -261,7 +261,7 @@ void testRequestBody(Client client) { }); test('client.send() with persistentConnection', () async { - // Do five requests to verify that the connection persistance logic is + // Do five requests to verify that the connection persistence logic is // correct. for (var i = 0; i < 5; ++i) { final request = Request('POST', Uri.http(host, '')) diff --git a/pkgs/web_socket/lib/src/web_socket.dart b/pkgs/web_socket/lib/src/web_socket.dart index 5e9d7ccd80..9894f26a36 100644 --- a/pkgs/web_socket/lib/src/web_socket.dart +++ b/pkgs/web_socket/lib/src/web_socket.dart @@ -169,7 +169,7 @@ abstract interface class WebSocket { /// /// - A close frame was received from the peer. [CloseReceived.code] and /// [CloseReceived.reason] will be set by the peer. - /// - A failure occured (e.g. the peer disconnected). [CloseReceived.code] and + /// - A failure occurred (e.g. the peer disconnected). [CloseReceived.code] and /// [CloseReceived.reason] will be a failure code defined by /// (RFC-6455)[https://www.rfc-editor.org/rfc/rfc6455.html#section-7.4.1] /// (e.g. 1006). diff --git a/pkgs/web_socket_conformance_tests/README.md b/pkgs/web_socket_conformance_tests/README.md index 50b514cd32..deabae0c55 100644 --- a/pkgs/web_socket_conformance_tests/README.md +++ b/pkgs/web_socket_conformance_tests/README.md @@ -31,5 +31,5 @@ void main() { } ``` -**Note**: This package does not have it's own tests, instead it is +**Note**: This package does not have its own tests, instead it is exercised by the tests in `package:web_socket`. diff --git a/pkgs/web_socket_conformance_tests/lib/src/protocol_tests.dart b/pkgs/web_socket_conformance_tests/lib/src/protocol_tests.dart index 4af977fb7c..2d35f1c4a4 100644 --- a/pkgs/web_socket_conformance_tests/lib/src/protocol_tests.dart +++ b/pkgs/web_socket_conformance_tests/lib/src/protocol_tests.dart @@ -48,7 +48,7 @@ void testProtocols( socket.sendText('Hello World!'); }); - test('mutiple protocols', () async { + test('multiple protocols', () async { final socket = await channelFactory( uri.replace(queryParameters: {'protocol': 'text.example.com'}), protocols: ['chat.example.com', 'text.example.com']);