Build a Lambda event dict for vc_handler.
(
method: str,
path: str,
headers: dict[str, str | list[str]] | None = None,
body: str | None = None,
encoding: str | None = None,
)
| 111 | |
| 112 | |
| 113 | def _lambda_event( |
| 114 | method: str, |
| 115 | path: str, |
| 116 | headers: dict[str, str | list[str]] | None = None, |
| 117 | body: str | None = None, |
| 118 | encoding: str | None = None, |
| 119 | ) -> dict[str, Any]: |
| 120 | """Build a Lambda event dict for vc_handler.""" |
| 121 | payload: dict[str, Any] = { |
| 122 | "method": method, |
| 123 | "path": path, |
| 124 | "headers": headers or {}, |
| 125 | } |
| 126 | if body is not None: |
| 127 | payload["body"] = body |
| 128 | if encoding is not None: |
| 129 | payload["encoding"] = encoding |
| 130 | return {"body": json.dumps(payload)} |
| 131 | |
| 132 | |
| 133 | async def _invoke_lambda( |
no outgoing calls
no test coverage detected