The Internet is becoming more and more open to communication between the entities on it, primary through the boom of great REST APIs over the last few years. In fact, WordPress is joining the effort with the WordPress REST API soon. In preparation, I thought I’d take a look at how HTTP works in general and how you can use native WordPress functions to work with it, opening up your products to integration with Twitter, Facebook, Mailchimp and all sorts of other tools. In this article – part 1 of 2 – I’ll show you the basics of HTTP requests, how they are structured, the information they contain and how to make sense of it. In part 2 we’ll put our knowledge into practice – through WordPress. What Is HTTP HTTP is the main protocol used on the web today, it stands for Hypertext Transfer Protocol and it is responsible for showing you HTML, images and more. HTTP clients – like your browser – send requests to HTTP servers which send back a response. For example, if you point your browser to Kinsta.com you are sending a request to Kinsta’s servers. The server reads your request, figures out what you need (we’ll talk about how this happens soon) and sends back a response which contains the HTML
Share This