mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
punctuation missing Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
@@ -881,7 +881,7 @@ cancel();
|
|||||||
|
|
||||||
### URLSearchParams
|
### URLSearchParams
|
||||||
|
|
||||||
By default, axios serializes JavaScript objects to `JSON`. To send data in the [`application/x-www-form-urlencoded` format](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) instead, you can use the [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) API, which is [supported](http://www.caniuse.com/#feat=urlsearchparams) in the vast majority of browsers, [and Node](https://nodejs.org/api/url.html#url_class_urlsearchparams) starting with v10 (released in 2018).
|
By default, axios serializes JavaScript objects to `JSON`. To send data in the [`application/x-www-form-urlencoded` format](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) instead, you can use the [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) API, which is [supported](http://www.caniuse.com/#feat=urlsearchparams) in the vast majority of browsers,and [ Node](https://nodejs.org/api/url.html#url_class_urlsearchparams) starting with v10 (released in 2018).
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const params = new URLSearchParams({ foo: 'bar' });
|
const params = new URLSearchParams({ foo: 'bar' });
|
||||||
@@ -945,7 +945,7 @@ await axios.postForm('https://postman-echo.com/post', data,
|
|||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
The server will handle it as
|
The server will handle it as:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user