summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Core/Messaging/DirectWebRequestOptions.cs
blob: 7adfd78b3365cc214d542b24affadc6391bc9cfa (plain)
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
//-----------------------------------------------------------------------
// <copyright file="DirectWebRequestOptions.cs" company="Outercurve Foundation">
//     Copyright (c) Outercurve Foundation. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace DotNetOpenAuth.Messaging {
	using System;
	using System.Net;

	/// <summary>
	/// A set of flags that can control the behavior of an individual web request.
	/// </summary>
	[Flags]
	public enum DirectWebRequestOptions {
		/// <summary>
		/// Indicates that default <see cref="HttpWebRequest"/> behavior is required.
		/// </summary>
		None = 0x0,

		/// <summary>
		/// Indicates that any response from the remote server, even those
		/// with HTTP status codes that indicate errors, should not result
		/// in a thrown exception.
		/// </summary>
		/// <remarks>
		/// Even with this flag set, <see cref="ProtocolException"/> should
		/// be thrown when an HTTP protocol error occurs (i.e. timeouts).
		/// </remarks>
		AcceptAllHttpResponses = 0x1,

		/// <summary>
		/// Indicates that the HTTP request must be completed entirely 
		/// using SSL (including any redirects).
		/// </summary>
		RequireSsl = 0x2,
	}
}