metal-ajax
Low-level Metal.js utility to perform Ajax requests. If you're looking for something higher level, take a look at fetch.
Use
Simple request
; Ajax ;
Posts
Ajax ;
Request headers and params
Custom request headers and params can bet set
using a MultiMap
from metal-structs.
; const headers = ;const params = ; headers;params; Ajax ;
Catching errors
Ajax ;
Watch for progress
In order for the progress
listener to work, the response must have
the Content-Length response
header set.
Ajax
Setup
-
Install a recent release of NodeJS if you don't have it yet.
-
Install local dependencies:
npm install
- Run the tests:
npm test
Contributing
Check out the contributing guidelines for more information.