Skip to content

ygw365/echo_server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

HTTP Echo Server

A simple HTTP echo server implemented in Python using the built-in http.server module.

Features

  • Handles GET and POST requests
  • Returns request path and headers for GET requests
  • Echoes back POST data
  • Runs on port 4000 by default

Usage

  1. Start the server:

    python3 echo_server.py
  2. Test with curl:

    # GET request
    curl http://localhost:4000/test
    
    # POST request
    curl -X POST -d "Hello World" http://localhost:4000/

Requirements

  • Python 3.x

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages