Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Titanium-Web-Proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Titanium-Web-Proxy
Commits
8fcb1868
Commit
8fcb1868
authored
Sep 05, 2015
by
titanium007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update readme
parent
80d6c482
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
README.md
README.md
+4
-3
SessionEventArgs.cs
Titanium.Web.Proxy/Models/SessionEventArgs.cs
+0
-1
No files found.
README.md
View file @
8fcb1868
...
...
@@ -60,7 +60,7 @@ Sample request and response event handlers
Console
.
WriteLine
(
e
.
RequestURL
);
if
(
e
.
RequestURL
.
Contains
(
"somewebsite.com"
))
if
((
e
.
ProxyRequest
.
Method
.
ToUpper
()
==
"POST"
||
e
.
ProxyRequest
.
Method
.
ToUpper
()
==
"PUT"
)
&&
e
.
ProxyRequest
.
ContentLength
>
0
)
if
((
e
.
RequestMethod
.
ToUpper
()
==
"POST"
||
e
.
RequestMethod
.
ToUpper
()
==
"PUT"
)
&&
e
.
Request
ContentLength
>
0
)
{
var
m
=
e
.
GetRequestBody
().
Replace
(
"a"
,
"b"
);
...
...
@@ -80,9 +80,10 @@ Sample request and response event handlers
public
void
OnResponse
(
object
sender
,
SessionEventArgs
e
)
{
if
(
e
.
ServerResponse
.
StatusCode
==
HttpStatusCode
.
OK
)
if
(
e
.
RequestURL
.
Contains
(
"somewebsite.com"
))
if
(
e
.
ResponseStatusCode
==
HttpStatusCode
.
OK
)
{
if
(
e
.
ServerResponse
.
ContentType
.
Trim
().
ToLower
().
Contains
(
"text/html"
))
if
(
e
.
Response
ContentType
.
Trim
().
ToLower
().
Contains
(
"text/html"
))
{
//Get response body
string
responseBody
=
e
.
GetResponseBody
();
...
...
Titanium.Web.Proxy/Models/SessionEventArgs.cs
View file @
8fcb1868
...
...
@@ -69,7 +69,6 @@ namespace Titanium.Web.Proxy.Models
}
public
string
GetRequestBody
()
{
if
((
proxyRequest
.
Method
.
ToUpper
()
==
"POST"
||
proxyRequest
.
Method
.
ToUpper
()
==
"PUT"
)
&&
requestContentLength
>
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment