Function
_write_response_log
(path: Path | None, *, request_id: str, payload: str)
Source from the content-addressed store, hash-verified
| 435 | |
| 436 | |
| 437 | def _write_response_log(path: Path | None, *, request_id: str, payload: str) -> None: |
| 438 | if path is None: |
| 439 | return |
| 440 | path.parent.mkdir(parents=True, exist_ok=True) |
| 441 | with path.open("a", encoding="utf-8") as handle: |
| 442 | handle.write(json.dumps({"request_id": request_id, "sse": payload}, ensure_ascii=False)) |
| 443 | handle.write("\n") |
| 444 | |
| 445 | |
| 446 | class ShimHandler(BaseHTTPRequestHandler): |
Tested by
no test coverage detected