summaryrefslogtreecommitdiffstats
path: root/src/DotNetOAuth/ChannelElements/IWebRequestHandler.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2008-09-21 21:38:41 -0700
committerAndrew <andrewarnott@gmail.com>2008-09-21 21:38:41 -0700
commitf80ac82be5e9432806ce35b7025b007246d74147 (patch)
tree9e194bfa753d03ea4deb2a02ffcd7f7db35cad0d /src/DotNetOAuth/ChannelElements/IWebRequestHandler.cs
parent2c381fbe2d2598e9549f5646d7bac40e49803760 (diff)
downloadDotNetOpenAuth-f80ac82be5e9432806ce35b7025b007246d74147.zip
DotNetOpenAuth-f80ac82be5e9432806ce35b7025b007246d74147.tar.gz
DotNetOpenAuth-f80ac82be5e9432806ce35b7025b007246d74147.tar.bz2
Adding the binding elements necessary for basic OAuth functionality.
Diffstat (limited to 'src/DotNetOAuth/ChannelElements/IWebRequestHandler.cs')
-rw-r--r--src/DotNetOAuth/ChannelElements/IWebRequestHandler.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/DotNetOAuth/ChannelElements/IWebRequestHandler.cs b/src/DotNetOAuth/ChannelElements/IWebRequestHandler.cs
new file mode 100644
index 0000000..13b57c7
--- /dev/null
+++ b/src/DotNetOAuth/ChannelElements/IWebRequestHandler.cs
@@ -0,0 +1,31 @@
+//-----------------------------------------------------------------------
+// <copyright file="IWebRequestHandler.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
+
+namespace DotNetOAuth.ChannelElements {
+ using System.IO;
+ using System.Net;
+ using DotNetOAuth.Messaging;
+
+ /// <summary>
+ /// A contract for <see cref="HttpWebRequest"/> handling.
+ /// </summary>
+ internal interface IWebRequestHandler {
+ /// <summary>
+ /// Prepares an <see cref="HttpWebRequest"/> that contains an POST entity for sending the entity.
+ /// </summary>
+ /// <param name="request">The <see cref="HttpWebRequest"/> that should contain the entity.</param>
+ /// <returns>The writer the caller should write out the entity data to.</returns>
+ TextWriter GetRequestStream(HttpWebRequest request);
+
+ /// <summary>
+ /// Processes an <see cref="HttpWebRequest"/> and converts the
+ /// <see cref="HttpWebResponse"/> to a <see cref="Response"/> instance.
+ /// </summary>
+ /// <param name="request">The <see cref="HttpWebRequest"/> to handle.</param>
+ /// <returns>An instance of <see cref="Response"/> describing the response.</returns>
+ Response GetResponse(HttpWebRequest request);
+ }
+}