forked from stevenh/HttpServer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIResponse.cs
55 lines (48 loc) · 1.43 KB
/
IResponse.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
using System.Net;
using HttpServer.Headers;
using HttpServer.Messages;
namespace HttpServer
{
/// <summary>
/// Response to a request.
/// </summary>
public interface IResponse : IMessage
{
/// <summary>
/// Gets connection type.
/// </summary>
ConnectionHeader Connection { get; }
/// <summary>
/// Gets cookies.
/// </summary>
ResponseCookieCollection Cookies { get; }
/// <summary>
/// Gets HTTP version.
/// </summary>
/// <remarks>
/// Default is HTTP/1.1
/// </remarks>
string HttpVersion { get; }
/// <summary>
/// Information about why a specific status code was used.
/// </summary>
string Reason { get; set; }
/// <summary>
/// Status code that is sent to the client.
/// </summary>
/// <remarks>Default is <see cref="HttpStatusCode.OK"/></remarks>
HttpStatusCode Status { get; set; }
///<summary>
/// Gets or sets content type
///</summary>
ContentTypeHeader ContentType { get; set; }
/// <summary>
/// Redirect user.
/// </summary>
/// <param name="uri">Where to redirect to.</param>
/// <remarks>
/// Any modifications after a redirect will be ignored.
/// </remarks>
void Redirect(string uri);
}
}