HTTP.Request.Provider - Cross-platform HTTP request implementation
new HTTP.Request.Provider.XHR({
method : 'POST',
url : 'http://my.host.com/some_url',
query : 'some text'
}).THEN(function (res) {
var status = res.status
var text = res.text
}).CATCH(function (e) {
var status = res.status
}).now()
// or
var req = new HTTP.Request.Provider.NodeJS({
method : 'POST',
postBody : 'some text'
})
req.setHeaders({
'X-My-Header' : 'value'
})
req.request('http://my.host.com/some_url').THEN(function (res) {
var status = res.status
var text = res.text
}).CATCH(function (e) {
var status = res.status
}).now()
HTTP.Request.Provider
is a stub for Joose-orientied JSAN modules.
None.
None.
None.
AttributeType attributeName
Attribute description
method signature
Method description
Our class can be used like this:
// then instantiating it
var instance = new HTTP.Request.Provider({
})
and like that:
// then instantiating it
var instance = new HTTP.Request.Provider({
})
This extension is supported via github issues tracker: http://github.com/SamuraiJack/Module-Stub/issues
For general Joose questions you can also visit #joose on irc.freenode.org or the forum at: http://joose.it/forum
Web page of this module: http://github.com/SamuraiJack/Module-Stub/
General documentation for Joose: http://openjsan.org/go/?l=Joose
All complex software has bugs lurking in it, and this module is no exception.
Please report any bugs through the web interface at http://github.com/SamuraiJack/Module-Stub/issues
Nickolay Platonov nplatonov@cpan.org
This software is Copyright (c) 2010 by Nickolay Platonov nplatonov@cpan.org.
This is free software, licensed under:
The GNU Lesser General Public License, Version 3, June 2007