1.3.1 • Published 3 years ago

ajax-sender v1.3.1

Weekly downloads
25
License
MIT
Repository
github
Last release
3 years ago

Ajax Sender (Demo)

Send AJAX requests easily

Doc

  • Installation

Simply import AjaxSender into your HTML.

<script src="https://unpkg.com/ajax-sender@1.2.1/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

1.3.1

3 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

0.1.12

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago