You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/3/en/part3a.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -216,7 +216,7 @@ console.log(`Server running on port ${PORT}`)
216
216
217
217
Let's restart the server (you can shut the server down by pressing _Ctrl+C_ in the console) and let's refresh the browser.
218
218
219
-
The <i>application/json</i> value in the <i>Content-Type</i> header informs the receiver that the data is in the JSON format. The _notes_ array gets transformed into JSON string format with the <em>JSON.stringify(notes)</em> method. This is necessary because the response.end() method expects a string or a buffer to send as the response body.
219
+
The <i>application/json</i> value in the <i>Content-Type</i> header informs the receiver that the data is in the JSON format. The _notes_ array gets transformed into JSON formatted string with the <em>JSON.stringify(notes)</em> method. This is necessary because the response.end() method expects a string or a buffer to send as the response body.
220
220
221
221
When we open the browser, the displayed format is exactly the same as in [part 2](/en/part2/getting_data_from_server/) where we used [json-server](https://github.com/typicode/json-server) to serve the list of notes:
222
222
@@ -340,7 +340,7 @@ The request is responded to with the [json](http://expressjs.com/en/4x/api.html#
340
340
341
341
Next, let's take a quick look at the data sent in JSON format.
342
342
343
-
In the earlier version where we were only using Node, we had to transform the data into the JSON string format with the _JSON.stringify_ method:
343
+
In the earlier version where we were only using Node, we had to transform the data into the JSON formatted string with the _JSON.stringify_ method:
0 commit comments