diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2008-09-10 22:18:15 -0700 |
---|---|---|
committer | Andrew <andrewarnott@gmail.com> | 2008-09-10 22:18:15 -0700 |
commit | f6d28fb14c91c97f6cc8b85c442987082997866a (patch) | |
tree | c517bf2a41709319255b5b5312f3fc56c06bff6e /src/DotNetOAuth/IWebRequestHandler.cs | |
parent | d33318e787968182f95c183d1891c9a7d59a3b69 (diff) | |
download | DotNetOpenAuth-f6d28fb14c91c97f6cc8b85c442987082997866a.zip DotNetOpenAuth-f6d28fb14c91c97f6cc8b85c442987082997866a.tar.gz DotNetOpenAuth-f6d28fb14c91c97f6cc8b85c442987082997866a.tar.bz2 |
Code coverage work is as complete as our implementation will currently allow.
Diffstat (limited to 'src/DotNetOAuth/IWebRequestHandler.cs')
-rw-r--r-- | src/DotNetOAuth/IWebRequestHandler.cs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/DotNetOAuth/IWebRequestHandler.cs b/src/DotNetOAuth/IWebRequestHandler.cs new file mode 100644 index 0000000..6281d5c --- /dev/null +++ b/src/DotNetOAuth/IWebRequestHandler.cs @@ -0,0 +1,31 @@ +//-----------------------------------------------------------------------
+// <copyright file="IWebRequestHandler.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
+
+namespace DotNetOAuth {
+ 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);
+ }
+}
|