How to Use SimpleHTTPServer in Python

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….

The post How to Use SimpleHTTPServer in Python appeared first on CodeSource.io.


This content originally appeared on CodeSource.io and was authored 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

Command in CMD
SimpleHTTPServer Localhost

Note: The SimpleHTTPServer functions by converting any directory into a web server.

The post How to Use SimpleHTTPServer in Python appeared first on CodeSource.io.


This content originally appeared on CodeSource.io and was authored by Ariessa Norramli


Print Share Comment Cite Upload Translate Updates
APA

Ariessa Norramli | Sciencx (2021-02-28T17:13:58+00:00) How to Use SimpleHTTPServer in Python. Retrieved from https://www.scien.cx/2021/02/28/how-to-use-simplehttpserver-in-python/

MLA
" » How to Use SimpleHTTPServer in Python." Ariessa Norramli | Sciencx - Sunday February 28, 2021, https://www.scien.cx/2021/02/28/how-to-use-simplehttpserver-in-python/
HARVARD
Ariessa Norramli | Sciencx Sunday February 28, 2021 » How to Use SimpleHTTPServer in Python., viewed ,<https://www.scien.cx/2021/02/28/how-to-use-simplehttpserver-in-python/>
VANCOUVER
Ariessa Norramli | Sciencx - » How to Use SimpleHTTPServer in Python. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/02/28/how-to-use-simplehttpserver-in-python/
CHICAGO
" » How to Use SimpleHTTPServer in Python." Ariessa Norramli | Sciencx - Accessed . https://www.scien.cx/2021/02/28/how-to-use-simplehttpserver-in-python/
IEEE
" » How to Use SimpleHTTPServer in Python." Ariessa Norramli | Sciencx [Online]. Available: https://www.scien.cx/2021/02/28/how-to-use-simplehttpserver-in-python/. [Accessed: ]
rf:citation
» How to Use SimpleHTTPServer in Python | Ariessa Norramli | Sciencx | https://www.scien.cx/2021/02/28/how-to-use-simplehttpserver-in-python/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.