xhr-envelope

1.0.2 • Public • Published

XMLHttpRequest Envelope

NPM version Build Status Coverage Status Known Vulnerabilities Dependencies Downloads Install Size Contributors Pull Requests Welcome

A wrapper for XMLHttpRequest to allow for simpler RESTful API transactions.

Client-Side Usage

<script src="xhr-envelope.js"></script>
 
<script type="text/javascript">
    envelope.setBaseUrl("http://127.0.0.1:3000");
 
    envelope.get(
        "status",
        function(error, result) {
            if(error) {
                return console.error(error);
            }
 
            return console.log(result);
        }
    );
</script> 

Installation

To install this module:

npm install xhr-envelope

Building

To build the distribution files for this module:

npm run build

or

gulp build

Package Sidebar

Install

npm i xhr-envelope

Weekly Downloads

6

Version

1.0.2

License

MIT

Unpacked Size

53.1 kB

Total Files

7

Last publish

Collaborators

  • nitro404