Created
February 20, 2010 13:30
-
-
Save oberhamsi/309682 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var client = require('ringo/httpclient') | |
var options = { | |
// exchange | |
'data': {}, | |
'headers': {}, | |
'method': 'GET', | |
'contentType': 'application/x-www-form-urlencoded;charset=utf-8', | |
'username': '', | |
'password': '', | |
'proxy': 'x.x.x.x:8888' | |
'proxyCredentials': {'username': '', 'password: ''}, | |
// exchange callbacks | |
'success': function(content, status, contentType, exchange), | |
'complete': function(content, status, contentType, exchange) | |
'part': function(contentPart, status, contentType, exchange), | |
'error': function(exception, exchange), | |
// client | |
'async': true, | |
'cache': true, | |
'timeout': 1000, | |
'followRedirects': true, | |
}); | |
client.do(options) // "do" as name not possible | |
// shortcut functions | |
* client.doGet(url, data, success, error) | |
* client.doPost(url, data, success, error) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment