1.1.0 • Published 11 years ago
mithril-requests v1.1.0
Mithril Requests
Creates sugar http methods for Mithril.js existing request library
Install
- Download the latest package
- NPM:
npm install mithril-requests
Setup
var m = require('mithril')
var requests = require('mithril-requests')
m = requests(m)Documentation
m.request.verb(url, options)
Sugar method to invoke an XHR request on the underlying m.request method, fully supporting
all options with no difference in api other than seperating out the url and method values.
Example
m.request.get('mockbin.com/request').then(function (value) {
console.log(value)
})Verbs
This is an array of lowercased method names that are supported.
getpostputheaddeleteoptionstracecopylockmkcolmovepurgepropfindproppatchunlockreportmkactivitycheckoutmergenotifysubscribeunsubscribepatchsearchconnect
License
Licensed under The MIT License.