justcoding121 / titanium-web-proxy

A cross-platform asynchronous HTTP(S) proxy server in C#.
MIT License
1.93k stars 618 forks source link

How to get request or response raw content text? #845

Closed sqlnew closed 3 years ago

sqlnew commented 3 years ago

Hi, i want to get the request or response raw content text in BeforeRequest or BeforeResponse Event ​contains the entire content of the entire HTTP header and body, How to do it? Thanks!

giesalabs commented 3 years ago

with OnBeforeResponse Task you can get in a string something i was able to get the html/text pages string value, but not a image byte array or from other file type are you looking for html/text?

sqlnew commented 3 years ago

@giesalabs According to your prompt, I get HTML in the onbeforeresponse event and get the whole content of HTML header according to the official example, which solves my problem. At the same time, I also want to get the image type. I am testing and studying. Thank you for your reply.