Returns: mitmproxy.net.http.Request
(**kwargs)
| 52 | |
| 53 | |
| 54 | def treq(**kwargs) -> http.Request: |
| 55 | """ |
| 56 | Returns: |
| 57 | mitmproxy.net.http.Request |
| 58 | """ |
| 59 | default = dict( |
| 60 | host="address", |
| 61 | port=22, |
| 62 | method=b"GET", |
| 63 | scheme=b"http", |
| 64 | authority=b"", |
| 65 | path=b"/path", |
| 66 | http_version=b"HTTP/1.1", |
| 67 | headers=http.Headers(((b"header", b"qvalue"), (b"content-length", b"7"))), |
| 68 | content=b"content", |
| 69 | trailers=None, |
| 70 | timestamp_start=946681200, |
| 71 | timestamp_end=946681201, |
| 72 | ) |
| 73 | default.update(kwargs) |
| 74 | return http.Request(**default) # type: ignore |
| 75 | |
| 76 | |
| 77 | def tresp(**kwargs) -> http.Response: |
searching dependent graphs…