Skip to content

Instantly share code, notes, and snippets.

@feedhenry-gists
feedhenry-gists / gist:1015275
Created June 8, 2011 20:08
Web Requests JSON Object
{
status: 200|404|1001|1002|1003|1004,
errors: [
{}//Only present if status != 200
],
body: '<The response from the remote site>',
contentType:'<The content type of the response>',
charset:'<The character set encoding of the response',
cookies:[
{
@feedhenry-gists
feedhenry-gists / gist:1015266
Created June 8, 2011 20:06
Web Requests Response Cloud
var res = $fh.web( parameters );
@feedhenry-gists
feedhenry-gists / gist:1015261
Created June 8, 2011 20:05
Web Requests Response Device
$fh.web( parameters, callback );
@feedhenry-gists
feedhenry-gists / gist:1015259
Created June 8, 2011 20:04
Web Requests Call
$fh.web( {
url: 'http://www.example.com/service',
method: 'POST',
charset: 'UTF-8',
contentType: 'text/json',
body: 'request_body',
params: [
{name:'param_name', value:'param_value'}
]
headers: [
@feedhenry-gists
feedhenry-gists / gist:1015247
Created June 8, 2011 20:01
Stringification Call
$fh.stringify( {testVar:"testValue", anArray:["val1","val2"]} );
$fh.ready( {},
function () {
// Make device calls
},
function(code,errorprops,params) {...} );
@feedhenry-gists
feedhenry-gists / gist:1015237
Created June 8, 2011 19:57
Read Rss Feed json Object
{
fields : {'author': <feed entry author>, 'title': <feed entry title>, 'description' : <feed entry descrption/content> }
}
@feedhenry-gists
feedhenry-gists / gist:1015234
Created June 8, 2011 19:56
Read Rss Feed Response
{
list: <A json array of feed entry json objects>
}
@feedhenry-gists
feedhenry-gists / gist:1015231
Created June 8, 2011 19:55
Read Rss Feed Call
var entries = $fh.feed(
{
'link': 'http://www.feedhenry.com/feed',
'list-max' : 10
}
);
$fh.parse( '{"testVar":"testValue", "anArray":["val1","val2"]}' );