diff --git a/README.md b/README.md index 2dcbb7b26..8d9697041 100644 --- a/README.md +++ b/README.md @@ -5471,32 +5471,18 @@ const httpPost = (url, callback, data = null, err = console.error) => { Examples ```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, diff --git a/docs/index.html b/docs/index.html index d04d8eccb..c3eb24e3e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1218,32 +1218,18 @@ Logs: { request.onerror = () => err(request); request.send(data); }; -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-const newPost = {
-  "userId": 1,
-  "id": 1337,
-  "title": "Foo",
-  "body": "bar bar bar"
+
const newPost = {
+  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,
diff --git a/snippets/httpPost.md b/snippets/httpPost.md
index 04c84846e..8b51b5fbe 100644
--- a/snippets/httpPost.md
+++ b/snippets/httpPost.md
@@ -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,