diff options
Diffstat (limited to 'src/DotNetOAuth/Messaging/HttpRequestInfo.cs')
-rw-r--r-- | src/DotNetOAuth/Messaging/HttpRequestInfo.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/DotNetOAuth/Messaging/HttpRequestInfo.cs b/src/DotNetOAuth/Messaging/HttpRequestInfo.cs index af0e637..efd9dec 100644 --- a/src/DotNetOAuth/Messaging/HttpRequestInfo.cs +++ b/src/DotNetOAuth/Messaging/HttpRequestInfo.cs @@ -10,6 +10,7 @@ namespace DotNetOAuth.Messaging { using System.Diagnostics;
using System.IO;
using System.Net;
+ using System.ServiceModel.Channels;
using System.Web;
/// <summary>
@@ -62,6 +63,21 @@ namespace DotNetOAuth.Messaging { /// <summary>
/// Initializes a new instance of the <see cref="HttpRequestInfo"/> class.
/// </summary>
+ /// <param name="request">The WCF incoming request structure to get the HTTP information from.</param>
+ /// <param name="requestUri">The URI of the service endpoint.</param>
+ internal HttpRequestInfo(HttpRequestMessageProperty request, Uri requestUri) {
+ if (request == null) {
+ throw new ArgumentNullException("request");
+ }
+
+ this.HttpMethod = request.Method;
+ this.Headers = request.Headers;
+ this.Url = requestUri;
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="HttpRequestInfo"/> class.
+ /// </summary>
/// <param name="request">The HttpWebRequest (that was never used) to copy from.</param>
internal HttpRequestInfo(WebRequest request) {
this.HttpMethod = request.Method;
|