For the More Curious: HTTP

When URLSessionTask interacts with a web server, it does so according to the rules outlined in the HTTP specification. The specification is very clear about the exact format of the request/response exchange between the client and the server. An example of a simple HTTP request is shown in Figure 20.7.

Figure 20.7  HTTP request format

Screenshot shows the HTTP request format.

Get iOS Programming: The Big Nerd Ranch Guide, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.