Explanation
Uses path converters to match complex URL patterns
Examples
Accept file paths
@app.get("/files/{file_path:path}")
def read_file(file_path: str):
return {"file_path": file_path}
Uses path converters to match complex URL patterns
Accept file paths
@app.get("/files/{file_path:path}")
def read_file(file_path: str):
return {"file_path": file_path}