How to Use SimpleHTTPServer in Python
Posted on: February 28, 2021 by Ariessa Norramli
In this article, you will learn how to use SimpleHTTPServer in Python. SimpleHTTPServer is a built-in Python module that provides standard GET and HEAD requests.
Use SimpleHTTPServer in Python
In this example, you need to open up a command prompt (CMD) or Terminal and navigate to any directory. Then, type the following command in your CMD or Terminal.
python -m SimpleHTTPServer 9000
Result
Note: The SimpleHTTPServer
functions by converting any directory into a web server.
Share on social media
//