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
d852471a
Commit
d852471a
authored
Nov 16, 2017
by
Honfika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Body proerties are not browsable, ExpandableObjectConverter
parent
387d6618
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
HeaderCollection.cs
Titanium.Web.Proxy/Http/HeaderCollection.cs
+5
-2
Request.cs
Titanium.Web.Proxy/Http/Request.cs
+4
-0
Response.cs
Titanium.Web.Proxy/Http/Response.cs
+4
-0
No files found.
Titanium.Web.Proxy/Http/HeaderCollection.cs
View file @
d852471a
using
System
;
using
System
;
using
System.Collections
;
using
System.Collections
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Linq
;
using
System.Linq
;
using
Titanium.Web.Proxy.Models
;
using
Titanium.Web.Proxy.Models
;
namespace
Titanium.Web.Proxy.Http
namespace
Titanium.Web.Proxy.Http
{
{
[
TypeConverter
(
typeof
(
ExpandableObjectConverter
))]
public
class
HeaderCollection
:
IEnumerable
<
HttpHeader
>
public
class
HeaderCollection
:
IEnumerable
<
HttpHeader
>
{
{
/// <summary>
/// <summary>
/// Unique Request header collection
/// Unique Request header collection
/// </summary>
/// </summary>
public
Dictionary
<
string
,
HttpHeader
>
Headers
{
get
;
set
;
}
public
Dictionary
<
string
,
HttpHeader
>
Headers
{
get
;
}
/// <summary>
/// <summary>
/// Non Unique headers
/// Non Unique headers
/// </summary>
/// </summary>
public
Dictionary
<
string
,
List
<
HttpHeader
>>
NonUniqueHeaders
{
get
;
set
;
}
public
Dictionary
<
string
,
List
<
HttpHeader
>>
NonUniqueHeaders
{
get
;
}
/// <summary>
/// <summary>
/// Initializes a new instance of the <see cref="HeaderCollection"/> class.
/// Initializes a new instance of the <see cref="HeaderCollection"/> class.
...
@@ -52,6 +54,7 @@ namespace Titanium.Web.Proxy.Http
...
@@ -52,6 +54,7 @@ namespace Titanium.Web.Proxy.Http
Headers
[
name
]
Headers
[
name
]
};
};
}
}
if
(
NonUniqueHeaders
.
ContainsKey
(
name
))
if
(
NonUniqueHeaders
.
ContainsKey
(
name
))
{
{
return
new
List
<
HttpHeader
>(
NonUniqueHeaders
[
name
]);
return
new
List
<
HttpHeader
>(
NonUniqueHeaders
[
name
]);
...
...
Titanium.Web.Proxy/Http/Request.cs
View file @
d852471a
using
System
;
using
System
;
using
System.ComponentModel
;
using
System.Text
;
using
System.Text
;
using
Titanium.Web.Proxy.Exceptions
;
using
Titanium.Web.Proxy.Exceptions
;
using
Titanium.Web.Proxy.Extensions
;
using
Titanium.Web.Proxy.Extensions
;
...
@@ -10,6 +11,7 @@ namespace Titanium.Web.Proxy.Http
...
@@ -10,6 +11,7 @@ namespace Titanium.Web.Proxy.Http
/// <summary>
/// <summary>
/// A HTTP(S) request object
/// A HTTP(S) request object
/// </summary>
/// </summary>
[
TypeConverter
(
typeof
(
ExpandableObjectConverter
))]
public
class
Request
public
class
Request
{
{
/// <summary>
/// <summary>
...
@@ -210,6 +212,7 @@ namespace Titanium.Web.Proxy.Http
...
@@ -210,6 +212,7 @@ namespace Titanium.Web.Proxy.Http
/// <summary>
/// <summary>
/// Request body as byte array
/// Request body as byte array
/// </summary>
/// </summary>
[
Browsable
(
false
)]
public
byte
[]
Body
public
byte
[]
Body
{
{
get
get
...
@@ -228,6 +231,7 @@ namespace Titanium.Web.Proxy.Http
...
@@ -228,6 +231,7 @@ namespace Titanium.Web.Proxy.Http
/// Request body as string
/// Request body as string
/// Use the encoding specified in request to decode the byte[] data to string
/// Use the encoding specified in request to decode the byte[] data to string
/// </summary>
/// </summary>
[
Browsable
(
false
)]
public
string
BodyString
=>
bodyString
??
(
bodyString
=
Encoding
.
GetString
(
Body
));
public
string
BodyString
=>
bodyString
??
(
bodyString
=
Encoding
.
GetString
(
Body
));
/// <summary>
/// <summary>
...
...
Titanium.Web.Proxy/Http/Response.cs
View file @
d852471a
using
System
;
using
System
;
using
System.ComponentModel
;
using
System.Text
;
using
System.Text
;
using
Titanium.Web.Proxy.Extensions
;
using
Titanium.Web.Proxy.Extensions
;
using
Titanium.Web.Proxy.Models
;
using
Titanium.Web.Proxy.Models
;
...
@@ -9,6 +10,7 @@ namespace Titanium.Web.Proxy.Http
...
@@ -9,6 +10,7 @@ namespace Titanium.Web.Proxy.Http
/// <summary>
/// <summary>
/// Http(s) response object
/// Http(s) response object
/// </summary>
/// </summary>
[
TypeConverter
(
typeof
(
ExpandableObjectConverter
))]
public
class
Response
public
class
Response
{
{
/// <summary>
/// <summary>
...
@@ -181,6 +183,7 @@ namespace Titanium.Web.Proxy.Http
...
@@ -181,6 +183,7 @@ namespace Titanium.Web.Proxy.Http
/// <summary>
/// <summary>
/// Response body as byte array
/// Response body as byte array
/// </summary>
/// </summary>
[
Browsable
(
false
)]
public
byte
[]
Body
public
byte
[]
Body
{
{
get
get
...
@@ -199,6 +202,7 @@ namespace Titanium.Web.Proxy.Http
...
@@ -199,6 +202,7 @@ namespace Titanium.Web.Proxy.Http
/// Response body as string
/// Response body as string
/// Use the encoding specified in response to decode the byte[] data to string
/// Use the encoding specified in response to decode the byte[] data to string
/// </summary>
/// </summary>
[
Browsable
(
false
)]
public
string
BodyString
=>
bodyString
??
(
bodyString
=
Encoding
.
GetString
(
Body
));
public
string
BodyString
=>
bodyString
??
(
bodyString
=
Encoding
.
GetString
(
Body
));
/// <summary>
/// <summary>
...
...
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