API headers - What do I know about them
In this post I want to talk about what I've learned about API headers. Recently I downloaded a free book on apple books app, "An Introduction to API" by Brain Cooksey. The author has explained information in simple terms with beginners in mind. What are API headers? Headers provide meta information about the request and response. They are items like, the client's request time, size of the request body, user-agent, content type of the request payload, authentication information... Commonly used headers: 1. "User-Agent" : The client uses this header to tell the server what type of device you are using. Ex: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15; PostmanRuntime/7.32.3 2. "Content-Type": The client is telling the server that data in the request body is formatted a particular way. The server will also