AlbertStjarne / Custom_HTTP_library

A custom HTTP library in three versions using different syntax

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom HTTP library

Building a custom HTTP library in three versions using different syntax.

Version File names Using
ver 1 app_ver1.js, easyhttp_ver1.js Ajax, XHR, Callbacks, ES5 promises
ver 2 app_ver2.js, easyhttp_ver2.js fetch, ES6 classes, promises
ver 3 app_ver3.js, easyhttp_ver3.js await async from ES7

Trying out the different versions

To try out the different files change the link names in the html file to the file wanted:

<script src="easyhttp_ver3.js"></script>
<script src="app_ver3.js"></script>

Also uncomment the message that should be run in the app_verX.js file, from start the DELETE user is uncommented.

Screenshots

GET request, fetching users

POST request, adding user (id: 11)

PUT request, updating (id: 2)

DELETE request, logging delete message

Author

About

A custom HTTP library in three versions using different syntax


Languages

Language:JavaScript 94.6%Language:HTML 5.4%