Travis build: 1207
This commit is contained in:
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user