summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2013-01-13 17:00:58 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2013-01-13 17:00:58 -0800
commit56916052cb61a48a85c5920f266766cfc937ece4 (patch)
tree372b8aeeae54e3bf268a482272819d17b3ab048d /src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs
parente117dedb1c2de355dae0bb3eedaa7b06deb0770e (diff)
downloadDotNetOpenAuth-56916052cb61a48a85c5920f266766cfc937ece4.zip
DotNetOpenAuth-56916052cb61a48a85c5920f266766cfc937ece4.tar.gz
DotNetOpenAuth-56916052cb61a48a85c5920f266766cfc937ece4.tar.bz2
DNOA.OAuth project now builds.
Diffstat (limited to 'src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs')
-rw-r--r--src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs b/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs
index 2aee6ea..d9fedf2 100644
--- a/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs
+++ b/src/DotNetOpenAuth.Core/Messaging/MessagingUtilities.cs
@@ -1484,23 +1484,23 @@ namespace DotNetOpenAuth.Messaging {
/// </summary>
/// <param name="httpMethod">The HTTP method.</param>
/// <returns>An HTTP verb, such as GET, POST, PUT, DELETE, PATCH, or OPTION.</returns>
- internal static string GetHttpVerb(HttpDeliveryMethods httpMethod) {
+ internal static HttpMethod GetHttpVerb(HttpDeliveryMethods httpMethod) {
if ((httpMethod & HttpDeliveryMethods.HttpVerbMask) == HttpDeliveryMethods.GetRequest) {
- return "GET";
+ return HttpMethod.Get;
} else if ((httpMethod & HttpDeliveryMethods.HttpVerbMask) == HttpDeliveryMethods.PostRequest) {
- return "POST";
+ return HttpMethod.Post;
} else if ((httpMethod & HttpDeliveryMethods.HttpVerbMask) == HttpDeliveryMethods.PutRequest) {
- return "PUT";
+ return HttpMethod.Put;
} else if ((httpMethod & HttpDeliveryMethods.HttpVerbMask) == HttpDeliveryMethods.DeleteRequest) {
- return "DELETE";
+ return HttpMethod.Delete;
} else if ((httpMethod & HttpDeliveryMethods.HttpVerbMask) == HttpDeliveryMethods.HeadRequest) {
- return "HEAD";
+ return HttpMethod.Head;
} else if ((httpMethod & HttpDeliveryMethods.HttpVerbMask) == HttpDeliveryMethods.PatchRequest) {
- return "PATCH";
+ return new HttpMethod("PATCH");
} else if ((httpMethod & HttpDeliveryMethods.HttpVerbMask) == HttpDeliveryMethods.OptionsRequest) {
- return "OPTIONS";
+ return HttpMethod.Options;
} else if ((httpMethod & HttpDeliveryMethods.AuthorizationHeaderRequest) != 0) {
- return "GET"; // if AuthorizationHeaderRequest is specified without an explicit HTTP verb, assume GET.
+ return HttpMethod.Get; // if AuthorizationHeaderRequest is specified without an explicit HTTP verb, assume GET.
} else {
throw ErrorUtilities.ThrowArgumentNamed("httpMethod", MessagingStrings.UnsupportedHttpVerb, httpMethod);
}