December 2019
Intermediate to advanced
510 pages
11h 33m
English
Let's look at the response of the following call:
https://api.nytimes.com/svc/books/v3/lists.json?api-key={your_api_key}&list=hardcover-fiction
As we mentioned previously, the response is a representation of the data, either stored in a data source or obtained from another system. In any case, some information is missing: how does the client know the format of the response? This kind of information is usually written in the response header. For example, here are all the headers of the previous request:
accept-ranges: bytesaccess-control-allow-headers:Accept, Content-Type, X-Forwarded-For, X-Prototype-Version, X-Requested-Withaccess-control-allow-methods: GET, OPTIONSaccess-control-allow-origin: *access-control-expose-headers: ...