![]() ![]() The HTTP Communication happens over a TCP Connection. To understand more about HTTP Request messages, see references at the end of this article. User-Agent: Mozilla/4.0 (compatible MSIE5.01 Windows NT) A sample HTTP request message looks something like GET /hello.html HTTP/1.1 The HTTP Request MessageĪ HTTP Client talks to HTTP Server via a common protocol that is understandable by the two parties. If you hit from the browser you should see Hello, World! rendered. Installing requirements pip install flask Python webserver script from flask import FlaskĪpp = def hello (): return "Hello, World!" The Webserverįor experimentation purpose let’s create a very basic webserver in Python Flask framework that exposes a trivial Hello World end point. ![]() Instead of using these tools and utilities, we shall go by the hard way and see HTTP messages in action. This complete process is abstracted by the tools like curl, requests libraries and utilities like Postman. Server reads the message, understands it, acts accordingly and replies back with HTTP Response. There is a HTTP Client which wants some data from HTTP Server, so it creates a HTTP Request Message in the protocol understandable by the server and sends it. Majority of the traffic over the internet is HTTP Traffic. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |