Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zenoo/ajax-sender
Send AJAX requests easily
https://github.com/zenoo/ajax-sender
ajax request send
Last synced: 30 days ago
JSON representation
Send AJAX requests easily
- Host: GitHub
- URL: https://github.com/zenoo/ajax-sender
- Owner: Zenoo
- License: mit
- Created: 2018-10-22T10:14:03.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-06T06:21:07.000Z (almost 2 years ago)
- Last Synced: 2024-11-06T08:06:19.484Z (about 2 months ago)
- Topics: ajax, request, send
- Language: JavaScript
- Homepage:
- Size: 1020 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Ajax Sender [(Demo)](https://jsfiddle.net/Zenoo0/sxupbLyk/)
Send AJAX requests easily
### Doc
* **Installation**
Simply import AjaxSender into your HTML.
```
```
* **How to use**Create a new [`AjaxSender`](https://zenoo.github.io/ajax-sender/AjaxSender.html) object with the URL as the first parameter :
```js
let ajax = new AjaxSender('https://your.url', options);
// OR using await
let data = await new AjaxSender('https://your.url', {
...,
wait: true
}).asPromise().send();
```
* **Options**```js
{
method: 'GET',
data: { ... },
responseType: 'json',
wait: false, // Wait before sending the request ?
headers: { ... },
progress: response => { ... },
load: response => { ... },
error: response => { ... },
uploadProgress: response => { ... },
uploadLoad: response => { ... }
}
```
* **Methods**See the [documentation](https://zenoo.github.io/ajax-sender/AjaxSender.html) for the method definitions.
* **Example**
See this [JSFiddle](https://jsfiddle.net/Zenoo0/sxupbLyk/) for a working example
## Authors
* **Zenoo** - *Initial work* - [Zenoo.fr](https://zenoo.fr)