Skip to content

OSWeekends/Another-AJAX-Library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

Releases

No releases published

Packages

No packages published