Generated output will appear here...+
diff --git a/src/http_convert/web.py b/src/http_convert/web.py new file mode 100644 index 0000000..896b791 --- /dev/null +++ b/src/http_convert/web.py @@ -0,0 +1,576 @@ +from fastapi import FastAPI, Request, HTTPException +from fastapi.responses import HTMLResponse +from fastapi.staticfiles import StaticFiles +from pydantic import BaseModel +from pathlib import Path +from typing import Optional, Dict, Any, List + +from .models import HTTPRequest, HttpMethod, OutputFormat +from .generators import Generator +from .parsers import Parser +from .highlighter import SyntaxHighlighter + + +app = FastAPI(title="HTTP Convert", description="HTTP Request Format Converter - Web Interface") + +static_path = Path(__file__).parent.parent / "static" +if static_path.exists(): + app.mount("/static", StaticFiles(directory=str(static_path)), name="static") + + +HTML_TEMPLATE = """ + + +
+ + +Convert HTTP requests between cURL, HTTPie, fetch, and axios formats
+Generated output will appear here...+