This function will be called for each chunk of request/response body data that arrives at the proxy, and once at the end of the message with an empty bytes argument (b""). It may either return bytes or an iterable of bytes (which would result in multiple HTTP/2 data frames).
(data: bytes)
| 12 | |
| 13 | |
| 14 | def modify(data: bytes) -> bytes | Iterable[bytes]: |
| 15 | """ |
| 16 | This function will be called for each chunk of request/response body data that arrives at the proxy, |
| 17 | and once at the end of the message with an empty bytes argument (b""). |
| 18 | |
| 19 | It may either return bytes or an iterable of bytes (which would result in multiple HTTP/2 data frames). |
| 20 | """ |
| 21 | return data.replace(b"foo", b"bar") |
| 22 | |
| 23 | |
| 24 | def responseheaders(flow): |
nothing calls this directly
no test coverage detected
searching dependent graphs…