Skip to content
This repository has been archived by the owner on Nov 11, 2019. It is now read-only.

Latest commit

 

History

History
35 lines (30 loc) · 628 Bytes

README.markdown

File metadata and controls

35 lines (30 loc) · 628 Bytes

CareJS

The straightforward AJAX javascript framework


GET request

care.xGet({
    url: 'http://example.com/somefile',
    vars: {
        arg1: 'foo',
        arg2: 'bar
    },
    handleAs: 'json',
    handler: foo,
    headers: {
        accept: 'application/xml'
    }
});

JSONP request

care.jsonp({
    url: 'http://example.com/somefile.php',
    vars: {
        arg1: 'foo',
        arg2: 'bar'
    },
    jsonp: 'callback',
    handler: foo,
    headers: {
        accept: 'application/xml'
    }
});