Skip to content

Latest commit

 

History

History
49 lines (37 loc) · 765 Bytes

README.md

File metadata and controls

49 lines (37 loc) · 765 Bytes

Another-AJAX-Library

Yep, Another AJAX Library

⚠️ JUST FOR EXPERIMENTAL USE ONLY!

Team

  • @Xexuline
  • @UlisesGascon

Concept

HEADERS

$http("http://airemad.com/api/v1/")
	.headers({
      'Accept': 'application/json',
      'Content-Type': 'application/json'
    })
    .method("trace")

Behaviour for GET, POST, PUT, DELETE

$http("http://airemad.com/api/v1/")
	.get("station/123")
	.then(console.log)
	.catch(console.warn)

$http("http://airemad.com/api/v1/")
	.get("station/123", (err, data) => {
		if(err){
			console.warn(err)
		} else {
			console.log(data)
		}

	})
$http("http://airemad.com/api/v1/")
	.post("station", {id:123})
	.then(console.log)
	.catch(console.warn)