update docs, add descriptions for api methods

This commit is contained in:
Leo Horie 2016-12-02 17:51:07 -05:00
parent d56c30cc4a
commit cdb9017a72
25 changed files with 613 additions and 40 deletions

View file

@ -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)`