https://github.com/adilius/python-rest-api-scratch
RESTful API using HTTPServer and BaseHTTPRequestHandler in Python from Scratch with no other external libraries
https://github.com/adilius/python-rest-api-scratch
http python rest
Last synced: about 1 year ago
JSON representation
RESTful API using HTTPServer and BaseHTTPRequestHandler in Python from Scratch with no other external libraries
- Host: GitHub
- URL: https://github.com/adilius/python-rest-api-scratch
- Owner: Adilius
- License: mit
- Created: 2021-11-01T07:35:05.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-11-02T14:13:11.000Z (over 4 years ago)
- Last Synced: 2025-01-11T06:45:23.165Z (over 1 year ago)
- Topics: http, python, rest
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PYTHON-REST-API-SCRATCH
RESTful API using HTTPServer and BaseHTTPRequestHandler in Python from Scratch with no other external libraries
## Quick start
1. Clone repository:
```bash
git clone https://github.com/Adilius/PYTHON-REST-API-SCRATCH.git
```
2. Change directory to repository:
```bash
cd .\PYTHON-REST-API-SCRATCH\
```
3. Run script!
```bash
python .\app.py
```
## Implemented requests
POST: `curl --request POST --url http://localhost:8080/ --data foo`
PUT: `curl --request PUT --url http://localhost:8080/ --data '{"foo":"bar"}'`
GET: `curl --request GET --url http://localhost:8080/ --data foo`
DELETE: `curl --request DELETE --url http://localhost:8080/ --data foo`