-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathHttpPacket.cs
84 lines (75 loc) · 1.67 KB
/
HttpPacket.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
* PROJECT: CosmosHttp Development
* CONTENT: Base Http packet class (Heavily inspered by https://github.com/2881099/TcpClientHttpRequest)
* PROGRAMMERS: Valentin Charbonnier <[email protected]>
*/
using System;
using System.Collections.Generic;
namespace CosmosHttp
{
public class HttpPacket : IDisposable
{
internal string _domain;
internal string _ip;
internal string _method = "GET";
internal string _charset = "us-ascii";
internal string _data;
internal string _head;
internal Dictionary<string, string> _headers;
public HttpPacket()
{
_headers = new Dictionary<string, string>();
}
public string Method
{
get
{
return _method;
}
set
{
_method = value.ToUpper();
}
}
public string Domain
{
get
{
return _domain;
}
set
{
_domain = value;
}
}
public string IP
{
get
{
return _ip;
}
set
{
_ip = value;
}
}
public string Charset
{
get
{
return _charset;
}
set
{
_charset = value;
}
}
public Dictionary<string, string> Headers
{
get { return _headers; }
}
public void Dispose()
{
}
}
}