-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp2.js
33 lines (28 loc) · 807 Bytes
/
app2.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
'use strict';
const http = new EasyHTTP();
// Get users GET
// http
// .get('https://jsonplaceholder.typicode.com/users')
// .then(data => console.log(data))
// .catch(err => console.log(err));
// User data
const data = {
name: 'John Doe',
username: 'johndoe',
email: '[email protected]'
};
// Create user POST
// http
// .post('https://jsonplaceholder.typicode.com/users', data)
// .then(data => console.log(data))
// .catch(err => console.log(err));
// Update user PUT
// http
// .put('https://jsonplaceholder.typicode.com/users/2', data)
// .then(data => console.log(data))
// .catch(err => console.log(err));
// Delete users DELETE
// http
// .delete('https://jsonplaceholder.typicode.com/users/2')
// .then(data => console.log(data))
// .catch(err => console.log(err));