Travis build: 1207

This commit is contained in:
30secondsofcode
2018-01-12 11:32:53 +00:00
parent b1072f5a79
commit ba24e72537
3 changed files with 28 additions and 52 deletions

View File

@ -22,13 +22,17 @@ const httpPost = (url, callback, data = null, err = console.error) => {
```js
const newPost = {
"userId": 1,
"id": 1337,
"title": "Foo",
"body": "bar bar bar"
userId: 1,
id: 1337,
title: 'Foo',
body: 'bar bar bar'
};
const data = JSON.stringify(newPost);
httpPost('https://jsonplaceholder.typicode.com/posts', console.log, data); /*
httpPost(
'https://jsonplaceholder.typicode.com/posts',
console.log,
data
); /*
Logs: {
"userId": 1,
"id": 1337,