Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some minor spelling and grammar issues #1239

Merged
merged 1 commit into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/2--package-http---i-found-a-bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion pkgs/cronet_http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkgs/cronet_http/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class _HomePageState extends State<HomePage> {
}

// 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<List<Book>> _findMatchingBooks(String query) async {
final response = await _client.get(
Uri.https(
Expand Down
4 changes: 2 additions & 2 deletions pkgs/cupertino_http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkgs/cupertino_http/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class _HomePageState extends State<HomePage> {
}

// 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<List<Book>> _findMatchingBooks(String query) async {
final response = await _client.get(
Uri.https(
Expand Down
2 changes: 1 addition & 1 deletion pkgs/cupertino_http/lib/src/cupertino_web_socket.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion pkgs/flutter_http_example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion pkgs/flutter_http_example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class _HomePageState extends State<HomePage> {
}

// 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<List<Book>> _findMatchingBooks(String query) async {
final response = await _client.get(
Uri.https(
Expand Down
10 changes: 5 additions & 5 deletions pkgs/http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
| -------------- | ------------------- | ----| ------- | ---------- | --------------- |
Expand All @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkgs/http/lib/src/response.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class Response extends BaseResponse {
Encoding _encodingForHeaders(Map<String, String> 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<String, String> headers) {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/http_client_conformance_tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Future<void> _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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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, ''))
Expand Down
2 changes: 1 addition & 1 deletion pkgs/web_socket/lib/src/web_socket.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion pkgs/web_socket_conformance_tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down
Loading