Skip to content
Send AJAX requests easily
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
docs
AjaxSender.js
AjaxSender.min.js
LICENSE
README.md
package-lock.json
package.json

README.md

Ajax Sender (Demo)

Send AJAX requests easily

Doc

  • Installation

Simply import AjaxSender into your HTML.

<script src="https://gitcdn.link/repo/Zenoo/ajax-sender/master/AjaxSender.min.js"></script>	
  • How to use

Create a new AjaxSender object with the URL as the first parameter :

let ajax = new AjaxSender('https://your.url', options);
// OR using await
let data = await new AjaxSender('https://your.url', {
	...,
	wait: true
}).asPromise().send();
  • Options
{
	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 for the method definitions.

  • Example

See this JSFiddle for a working example

Authors

You can’t perform that action at this time.