-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathIWebRequest.cs
69 lines (59 loc) · 1.86 KB
/
IWebRequest.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
using System.Collections.Generic;
namespace Inversion.Web {
/// <summary>
/// Describes a request to be processed by a web application.
/// </summary>
public interface IWebRequest {
/// <summary>
/// Gives access to any files uploaded by the user agent
/// as part of this request.
/// </summary>
IRequestFilesCollection Files { get; }
/// <summary>
/// Gives access to a url-info object that provides
/// info about the structure of the url of the request.
/// </summary>
UrlInfo UrlInfo { get; }
/// <summary>
/// The http method of the request.
/// </summary>
string Method { get; }
/// <summary>
/// Returns true if the http method of this request is GET; otherwise returns false.
/// </summary>
bool IsGet { get; }
/// <summary>
/// Returns true if the http method of this request is POST; otherwise returns false.
/// </summary>
bool IsPost { get; }
/// <summary>
/// Provides access to the request parameters from both the querystring
/// and those that are posted.
/// </summary>
/// <remarks>
/// First params are read from the querystring and then those posted which
/// will override any from the querystring.
/// </remarks>
IDictionary<string, string> Params { get; }
/// <summary>
/// Gives access to the payload if any of the request.
/// </summary>
string Payload { get; }
/// <summary>
/// Gives access to any flags present in the querystring.
/// </summary>
/// <remarks>
/// Any querystring parameter that is a single value rather
/// that a key-value pair is regarded as a flag.
/// </remarks>
IEnumerable<string> Flags { get; }
/// <summary>
/// Gives access to the headers of the reuqest.
/// </summary>
IDictionary<string, string> Headers { get; }
/// <summary>
/// Gives access to the request cookies.
/// </summary>
IRequestCookieCollection Cookies { get; }
}
}