Skip to content

Commit b7d2820

Browse files
authored
Merge pull request #2391 from RapTho/patch-6
Fixed small typos
2 parents 1404669 + 9a84c51 commit b7d2820

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

5-network/07-url/article.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Here's the cheatsheet for URL components:
6565
```smart header="We can pass `URL` objects to networking (and most other) methods instead of a string"
6666
We can use a `URL` object in `fetch` or `XMLHttpRequest`, almost everywhere where a URL-string is expected.
6767

68-
Generally, `URL` object can be passed to any method instead of a string, as most method will perform the string conversion, that turns a `URL` object into a string with full URL.
68+
Generally, the `URL` object can be passed to any method instead of a string, as most methods will perform the string conversion, that turns a `URL` object into a string with full URL.
6969
```
7070
7171
## SearchParams "?..."
@@ -80,7 +80,7 @@ new URL('https://google.com/search?query=JavaScript')
8080

8181
...But parameters need to be encoded if they contain spaces, non-latin letters, etc (more about that below).
8282

83-
So there's URL property for that: `url.searchParams`, an object of type [URLSearchParams](https://url.spec.whatwg.org/#urlsearchparams).
83+
So there's a URL property for that: `url.searchParams`, an object of type [URLSearchParams](https://url.spec.whatwg.org/#urlsearchparams).
8484

8585
It provides convenient methods for search parameters:
8686

@@ -201,7 +201,7 @@ So we should use only `encodeURIComponent` for each search parameter, to correct
201201
````smart header="Encoding difference compared to `URL`"
202202
Classes [URL](https://url.spec.whatwg.org/#url-class) and [URLSearchParams](https://url.spec.whatwg.org/#interface-urlsearchparams) are based on the latest URI specification: [RFC3986](https://tools.ietf.org/html/rfc3986), while `encode*` functions are based on the obsolete version [RFC2396](https://www.ietf.org/rfc/rfc2396.txt).
203203

204-
There are few differences, e.g. IPv6 addresses are encoded differently:
204+
There are a few differences, e.g. IPv6 addresses are encoded differently:
205205

206206
```js run
207207
// valid url with IPv6 address

0 commit comments

Comments
 (0)