Skip to content

Latest commit

 

History

History
 
 

xhr-promise

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Description

Simple HTTP client with Promise and XMLHttpRequest.

Useage

<script src="//cdn.bootcss.com/babel-polyfill/6.20.0/polyfill.min.js"></script>
<script src="build.js"></script>
<script>
  function Foo () {
    request.get('/api/v1/blabla').then(function (xhr) {
      console.log('response text: ' + xhr.responseText);
    }, function (xhr) {
      console.log('response error: ' + xhr.statusText);
    })
  }
</script>