update docs, add descriptions for api methods
This commit is contained in:
parent
d56c30cc4a
commit
cdb9017a72
25 changed files with 613 additions and 40 deletions
|
|
@ -1,11 +1,29 @@
|
|||
# jsonp(options)
|
||||
|
||||
- [Description](#description)
|
||||
- [Signature](#signature)
|
||||
- [How it works](#how-it-works)
|
||||
- [Typical usage](#typical-usage)
|
||||
|
||||
---
|
||||
|
||||
### Description
|
||||
|
||||
Makes JSON-P requests. Typically, it's useful to interact with servers that allow JSON-P but that don't have CORS enabled.
|
||||
|
||||
```javascript
|
||||
m.jsonp({
|
||||
url: "/api/v1/users/:id",
|
||||
data: {id: 1},
|
||||
callbackKey: "callback",
|
||||
})
|
||||
.then(function(result) {
|
||||
console.log(result)
|
||||
})
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Signature
|
||||
|
||||
`promise = m.jsonp(options)`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue