Skip to content

Commit

Permalink
Fix typo and formatting, add colons (#4853)
Browse files Browse the repository at this point in the history
* Fix typo, add colons

* Fix code formatting

* Fix code formatting

Co-authored-by: Jay <jasonsaayman@gmail.com>
  • Loading branch information
karlhorky and jasonsaayman committed Sep 15, 2022
1 parent 738fa63 commit d57fdb6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Expand Up @@ -515,7 +515,7 @@ These are the available config options for making requests. Only the `url` is re
},

formSerializer: {
visitor: (value, key, path, helpers)=> {}; // custom visitor funaction to serrialize form values
visitor: (value, key, path, helpers) => {}; // custom visitor funaction to serrialize form values
dots: boolean; // use dots instead of brackets format
metaTokens: boolean; // keep special endings like {} in parameter key
indexes: boolean; // array indexes format null - no brackets, false - empty brackets, true - brackets with indexes
Expand Down Expand Up @@ -965,7 +965,7 @@ axios.post('https://httpbin.org/post', {x: 1}, {
headers: {
'Content-Type': 'multipart/form-data'
}
}).then(({data})=> console.log(data));
}).then(({data}) => console.log(data));
```

In the `node.js` build, the ([`form-data`](https://github.com/form-data/form-data)) polyfill is used by default.
Expand All @@ -974,14 +974,14 @@ You can overload the FormData class by setting the `env.FormData` config variabl
but you probably won't need it in most cases:
```js
const axios= require('axios');
const axios = require('axios');
var FormData = require('form-data');
axios.post('https://httpbin.org/post', {x: 1, buf: new Buffer(10)}, {
headers: {
'Content-Type': 'multipart/form-data'
}
}).then(({data})=> console.log(data));
}).then(({data}) => console.log(data));
```
Axios FormData serializer supports some special endings to perform the following operations:
Expand Down Expand Up @@ -1023,7 +1023,7 @@ const obj = {
The following steps will be executed by the Axios serializer internally:
```js
const formData= new FormData();
const formData = new FormData();
formData.append('x', '1');
formData.append('arr[]', '1');
formData.append('arr[]', '2');
Expand All @@ -1043,7 +1043,7 @@ which are just the corresponding http methods with the `Content-Type` header pre
## Files Posting
You can easily sumbit a single file
You can easily submit a single file:
```js
await axios.postForm('https://httpbin.org/post', {
Expand All @@ -1052,7 +1052,7 @@ await axios.postForm('https://httpbin.org/post', {
});
```
or multiple files as `multipart/form-data`.
or multiple files as `multipart/form-data`:
```js
await axios.postForm('https://httpbin.org/post', {
Expand Down

0 comments on commit d57fdb6

Please sign in to comment.