TLDR: HTTP - The Hard Way with Netcat
Date: 2016-04-12 Source: https://arpitbhayani.me/blogs/making-http-requests-using-netcat
Overview
Explore HTTP messages by building a simple Python webserver and interacting with it using Netcat. Majority of the traffic over the internet is HTTP Traffic.
Key Points
- Majority of the traffic over the internet is HTTP Traffic.
- The Webserver: For experimentation purpose let’s create a very basic webserver in Python Flask framework that exposes a trivial Hello World end point.
- The HTTP Request Message: A HTTP Client talks to HTTP Server via a common protocol that is understandable by the two parties.
- Netcat: netcat is the utility that is used for just about anything under the sun involving TCP or UDP.
- Complex Requests and HTTP Request Messages: GET method with query params and headers Following method exposes an endpoint which accepts a query parameter named name, and returns a response with name in it.