This is a simple curl-like HTTP client implemented in Python. It allows you to send HTTP requests to a specified URL and receive the response.
I created this program was designed based on a challenge on the "Coding Challenges" website: https://codingchallenges.fyi/challenges/challenge-curl
To use this program, follow the steps below:
-
Make sure you have Python installed on your machine.
-
Clone or download the repository to your local machine.
-
Open a terminal or command prompt and navigate to the project directory.
-
Execute the program by running the following command:
python main.py [options] urlReplace
[options]with any of the following:-vor--verbose: Enable verbose output.-X METHODor--method METHOD: Specify the HTTP method (default is GET).-d DATAor--data DATA: Specify the data to send in the request body.-H HEADERor--header HEADER: Specify additional headers.
Replace
urlwith the URL to send the request to. -
The program will send the HTTP request and display the response.
Here are some examples of how to use the program:
-
Send a GET request to a URL:
python main.py -v -X GET https://example.com/get -
Send a POST request with data and headers:
python main.py -v -X POST https://example.com/post -d '{"key": "value"}' -H "Content-Type: application/json" -
Enable verbose output:
python main.py -v https://example.com/get
This project is licensed under the MIT License. See the LICENSE file for details.
