titanium-web-proxy | A cross-platform asynchronous HTTP proxy server in C | Proxy library
kandi X-RAY | titanium-web-proxy Summary
kandi X-RAY | titanium-web-proxy Summary
A lightweight HTTP(S) proxy server written in C#. Report bugs or raise issues here. For programming help use StackOverflow with the tag Titanium-Web-Proxy.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of titanium-web-proxy
titanium-web-proxy Key Features
titanium-web-proxy Examples and Code Snippets
Community Discussions
Trending Discussions on titanium-web-proxy
QUESTION
I used to use another proxy server library with C# to capture HTTP request, and it only has a AfterSessionComplete
event which fires after the whole request/response action has all finished, and you can get the the host, path and query, request and response body all from the event argument. However that library stopped maintenancing sometime ago so I am considering switching to Titanium-Web-Proxy, and seems like it has a AfterResponse
event. Here is what I used to test:
ANSWER
Answered 2020-Oct-02 at 14:21In Titanium, the AfterResponse event marks a moment when the response was sent to the browser (and is no longer available). So to read the response body, you need to attach to the BeforeResponse event. Additionally, as you observed, you can't access the request body in the* Response events. One option to overcome this limitation is to use the UserData property and, in the BeforeRequest event, save all the data from the request body that you may later need. The example code below shows how to do that:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install titanium-web-proxy
.NET Standard 2.0 or above
.NET Framework 4.5 or above
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page