Update README.md (fix incorrect option name)
Fix `options.params` to `options.data` according to the source code (https://github.com/liziqiang/simple-jsonp-promise/blob/master/src/index.js#L22)
This commit is contained in:
parent
6ef82540a5
commit
fb1e5db79f
1 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ yarn add simple-jsonp-promise
|
||||||
``` bash
|
``` bash
|
||||||
import jsonp from 'simple-jsonp-promise'
|
import jsonp from 'simple-jsonp-promise'
|
||||||
let options = {
|
let options = {
|
||||||
params:{
|
data: {
|
||||||
a : 1,
|
a : 1,
|
||||||
b : 2
|
b : 2
|
||||||
},
|
},
|
||||||
|
@ -20,4 +20,4 @@ let options = {
|
||||||
timeout : 15000
|
timeout : 15000
|
||||||
}
|
}
|
||||||
let response = await jsonp('https://localhost/api.jsonp' , options);
|
let response = await jsonp('https://localhost/api.jsonp' , options);
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Reference in a new issue