https://github.com/krescruz/http-handler-light
Http request & response handler light with jQuery
https://github.com/krescruz/http-handler-light
ajax http jquery light request response
Last synced: 11 months ago
JSON representation
Http request & response handler light with jQuery
- Host: GitHub
- URL: https://github.com/krescruz/http-handler-light
- Owner: krescruz
- License: mit
- Created: 2017-09-07T17:13:11.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-07T17:53:28.000Z (over 8 years ago)
- Last Synced: 2025-01-18T07:25:54.549Z (about 1 year ago)
- Topics: ajax, http, jquery, light, request, response
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#### Request HTTP
```javascript
httpRequest.get(url, data);
httpRequest.post(url, data);
```
#### Response HTTP
```javascript
httpResponse.success(...);
httpResponse.fail(...);
```
#### But how do I use it?
```javascript
var url = '../endpoint/';
var data = {'name': 'kres', 'lastname': 'cruz'};
//Answer a promise
httpRequest.post(url, data)
.then(httpResponse.success, httpResponse.fail);
```