diff options
Diffstat (limited to 'src/DotNetOpenAuth.Core/Messaging/DirectWebRequestOptions.cs')
-rw-r--r-- | src/DotNetOpenAuth.Core/Messaging/DirectWebRequestOptions.cs | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth.Core/Messaging/DirectWebRequestOptions.cs b/src/DotNetOpenAuth.Core/Messaging/DirectWebRequestOptions.cs new file mode 100644 index 0000000..f3ce805 --- /dev/null +++ b/src/DotNetOpenAuth.Core/Messaging/DirectWebRequestOptions.cs @@ -0,0 +1,38 @@ +//----------------------------------------------------------------------- +// <copyright file="DirectWebRequestOptions.cs" company="Andrew Arnott"> +// Copyright (c) Andrew Arnott. 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, + } +} |