Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Commit

Permalink
chore(network): add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoang Trieu, Khang committed Jul 6, 2019
1 parent 7ff13dc commit 3a1376d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions foo.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,17 @@ const fetch = require('node-fetch');
fetch('http://jsonplaceholder.typicode.com/todos/5');

fetch('https://developers.video.ibm.com/images/example-channel-nasa.jpg')

fetch('https://jsonplaceholder.typicode.com/posts', {
method: 'POST',
body: JSON.stringify({
title: 'foo',
body: 'bar',
userId: 1
}),
headers: {
'Content-type': 'application/json; charset=UTF-8'
}
})
.then(response => response.json())
.then(json => console.log(json))

0 comments on commit 3a1376d

Please sign in to comment.