* Fix for #2423. request.data is replaced by body, params is used for querystring interpolation. * Updated documentation after code review by shadowhand and isiahmeadows * Convert indentation to tabs * Replacing m.request.data and m.jsonp.data with params or body. * Update request.md Co-authored-by: Isiah Meadows <contact@isiahmeadows.com>
This commit is contained in:
parent
e82f6d00c2
commit
8a7eae00ed
7 changed files with 40 additions and 40 deletions
|
|
@ -79,7 +79,7 @@ m("a[href='/Home']", {oncreate: m.route.link}, "Go to home page")
|
|||
m.request({
|
||||
method: "PUT",
|
||||
url: "/api/v1/users/:id",
|
||||
data: {id: 1, name: "test"}
|
||||
params: {id: 1, name: "test"}
|
||||
})
|
||||
.then(function(result) {
|
||||
console.log(result)
|
||||
|
|
@ -93,7 +93,7 @@ m.request({
|
|||
```javascript
|
||||
m.jsonp({
|
||||
url: "/api/v1/users/:id",
|
||||
data: {id: 1},
|
||||
params: {id: 1},
|
||||
callbackKey: "callback",
|
||||
})
|
||||
.then(function(result) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue