XMLHttpRequest API - GET and POST data