Skip to content

Files

Latest commit

 

History

History
21 lines (18 loc) · 400 Bytes

README.md

File metadata and controls

21 lines (18 loc) · 400 Bytes

Request HTTP

httpRequest.get(url, data);
httpRequest.post(url, data);

Response HTTP

httpResponse.success(...);
httpResponse.fail(...);

But how do I use it?

var url = '../endpoint/';
var data = {'name': 'kres', 'lastname': 'cruz'};

//Answer a promise
httpRequest.post(url, data)
  .then(httpResponse.success, httpResponse.fail);