Title: Design and Build Great Web APIs: Incorrect reference to example HTTP request (page 24)
Page 23 lists an example HTTP request:
"Here’s what a real HTTP request and response look like:
POST /create-user HTTP/2
Host: www.tutorialspoint.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 46
name=mike&email=mike@example.org&sms=123456789"
Then, on page 24 it states:
"The first line is the start-line and it contains three elements:
• HTTP method (POST)
• URL (/create-user)
• Protocol version (HTTP/2)
The next two lines are part of the header collection. In this example, it contains two values:
- The type of message body being sent (Content-Type: application/x-www-form-urlen- coded)
- The size of the message body (Content-Length: 46)"
Suggestion: Either describe the Host: www.tutorialspoint.com line or change sentence to “The next two lines after the Host line are part of the header collection.”
#web-deveopment #cloud #book-design-and-build-great-web-apis #javascript #pragprog #published-book