An open API service indexing awesome lists of open source software.

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

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`