Kaydet (Commit) 4d9a6035 authored tarafından Batuhan Osman TASKAYA's avatar Batuhan Osman TASKAYA

Inital

üst
"""A web framework built atop on python's http.server"""
from dataclasses import dataclass
from http import HTTPStatus
from http.server import SimpleHTTPRequestHandler
from typing import Dict, Callable
@dataclass
class Response:
"""HTTP Response"""
code: HTTPStatus
body: str
class Dispatcher(SimpleHTTPRequestHandler):
"""Dispatch HTTP requests to registered services"""
_services: Dict[str, Callable[..., Response]] = {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment