Request body is always empty #1182
Answered
by
abhinavsingh
thiagobenine
asked this question in
Q&A
-
I created the following plugin class MyProxyPlugin(HttpProxyBasePlugin):
def before_upstream_connection(
self, request: HttpParser,
) -> Optional[HttpParser]:
print(f"(before_upstream_connection) request_body: {request.body}")
return request
def handle_client_request(
self, request: HttpParser,
) -> Optional[HttpParser]:
print(f"(handle_client_request) request_body: {request.body}")
return request
def handle_client_data(
self, raw: memoryview,
) -> Optional[memoryview]:
print(f"(handle_client_data) raw: {raw}")
return raw This is the request I am performing
This is the output in the terminal. As you can see,
What am I missing here? |
Beta Was this translation helpful? Give feedback.
Answered by
abhinavsingh
Jun 7, 2022
Replies: 1 comment 1 reply
-
@thiagobenine You cannot intercept
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
abhinavsingh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@thiagobenine You cannot intercept
https
proxy requests without enabling interception. Either:http
, there afterrequest.body
should look likeb'{\n"Key": "Value"\n}'