Commit 9710b6cd authored by titanium007's avatar titanium007

update readme

parent 2d880884
...@@ -55,10 +55,8 @@ Sample request and response event handlers ...@@ -55,10 +55,8 @@ Sample request and response event handlers
//Test On Request, intercept requests //Test On Request, intercept requests
public void OnRequest(object sender, SessionEventArgs e) public void OnRequest(object sender, SessionEventArgs e)
{ {
Console.WriteLine(e.RequestURL); Console.WriteLine(e.RequestURL);
//read request headers //read request headers
var requestHeaders = e.RequestHeaders; var requestHeaders = e.RequestHeaders;
...@@ -81,16 +79,13 @@ Sample request and response event handlers ...@@ -81,16 +79,13 @@ Sample request and response event handlers
{ {
e.Ok("<!DOCTYPE html><html><body><h1>Website Blocked</h1><p>Blocked by titanium web proxy.</p></body></html>"); e.Ok("<!DOCTYPE html><html><body><h1>Website Blocked</h1><p>Blocked by titanium web proxy.</p></body></html>");
} }
} }
public void OnResponse(object sender, SessionEventArgs e) public void OnResponse(object sender, SessionEventArgs e)
{ {
//read response headers //read response headers
var responseHeaders = e.ResponseHeaders; var responseHeaders = e.ResponseHeaders;
if (e.ResponseStatusCode == HttpStatusCode.OK) if (e.ResponseStatusCode == HttpStatusCode.OK)
{ {
if (e.ResponseContentType.Trim().ToLower().Contains("text/html")) if (e.ResponseContentType.Trim().ToLower().Contains("text/html"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment