RuKoder.ru RUKODER.ru
08 ЯНВ 2015
0

aja.js - асинхронный JavaScript и JavaScript/JSON(P)

JavaScript
Пример
aja()
.method('get')
.url('/api/customer')
.data({firstname: 'john romuald'})
.on('200', function(response){
//well done
})
.go();

aja()
.method('put')
.url('/api/customer')
.cache(false)
.body({id : 12, firstname: 'john romuald', job : 'linguist'})
.on('200', function(response){
//well done
})
.on('40*', function(response){
//something is definitely wrong
})
.on('500', function(response){
//oh crap
})
.go();

https://github.com/krampstudio/aja.js

Добавить комментарий

Категории:

  • CSS (121)
  • PHP (301)
  • JavaScript (704)

Оставить на заметку в:

© 2026 RuKoder.ru