<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>HTTP Message Handlers</title><link>http://www.asp.net</link><pubDate>Thu, 11 Apr 2013 01:44:37 GMT</pubDate><generator>umbraco</generator><description>Comments for HTTP Message Handlers</description><language>en</language><atom:link href="http://www.asp.net/rss/comments/37111" rel="self" type="application/rss+xml" /><item><title>Comment Posted by tonypujals</title><link>http://www.asp.net/web-api/overview/working-with-http/http-message-handlers</link><pubDate>Thu, 16 Feb 2012 23:44:31 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014846</guid><description><![CDATA[ <p>Great job with all of these articles!  Just a minor correction for the code sample in the &quot;Server&quot; section:</p><p></p><p>...</p><p>HttpServer server = new HttpServer(config);</p><p></p><p>// Connect client directly to server</p><p>HttpClient client = new HttpClient(handler);</p><p>...</p><p></p><p>Should be:</p><p></p><p>...</p><p>// server is a message handler</p><p>HttpServer server = new HttpServer(config);</p><p></p><p>// Connect client directly to server</p><p>HttpClient client = new HttpClient(server);</p><p>...</p><p></p><p>Thanks for the articles!</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/tonypujals.jpg?forceidenticon=false&amp;dt=635046231000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by steveculshaw</title><link>http://www.asp.net/web-api/overview/working-with-http/http-message-handlers</link><pubDate>Tue, 21 Feb 2012 04:20:25 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014896</guid><description><![CDATA[ <p>Sorry, all new to me, but in the example about the client connecting directly to the server, where does it get &quot;handler&quot; from ?</p><p></p><p>HttpServer server = new HttpServer(config);</p><p></p><p>// Connect client directly to server</p><p>HttpClient client = new HttpClient(handler);</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/steveculshaw.jpg?forceidenticon=false&amp;dt=635046231000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by steveculshaw</title><link>http://www.asp.net/web-api/overview/working-with-http/http-message-handlers</link><pubDate>Tue, 21 Feb 2012 04:21:11 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000014897</guid><description><![CDATA[ <p>Ah, just seen the comments ... r/handler/server ... cool</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/steveculshaw.jpg?forceidenticon=false&amp;dt=635046231000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by MikeWasson</title><link>http://www.asp.net/web-api/overview/working-with-http/http-message-handlers</link><pubDate>Tue, 06 Mar 2012 23:59:48 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015041</guid><description><![CDATA[ <p>@tonypujals: Yes, thanks! Fixed.</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/MikeWasson.jpg?forceidenticon=false&amp;dt=635046231000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by jordan.terrell</title><link>http://www.asp.net/web-api/overview/working-with-http/http-message-handlers</link><pubDate>Wed, 04 Apr 2012 15:21:19 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015260</guid><description><![CDATA[ <p>Mike - Nice article! Nitpick/Question: Shouldn&#39;t the DelegatingHandler be named the DecoratingHandler?  The design looks more like decorator pattern [1] than it does the delegator/delegation pattern [2].</p><p></p><p>[1] <a rel="nofollow" href="http://en.wikipedia.org/wiki/Decorator_pattern" target="_blank">en.wikipedia.org/</a></p><p>[2] <a rel="nofollow" href="http://en.wikipedia.org/wiki/Delegation_pattern" target="_blank">en.wikipedia.org/</a></p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/jordan.terrell.jpg?forceidenticon=false&amp;dt=635046231000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by akber007</title><link>http://www.asp.net/web-api/overview/working-with-http/http-message-handlers</link><pubDate>Thu, 12 Apr 2012 18:07:01 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015307</guid><description><![CDATA[ <p>Hi Mike,</p><p></p><p>I would like to know, how to pass an XML for post method, where it takes that xml as object, specially when using with windows forms, without using JQuery or JSON? There are plenty of examples which shows how to post and put data with JQuery and JSON but not with Windows or other form of posting.</p><p></p><p>Sooner reply will be a great help on time.</p><p></p><p>Thanks</p><p>Akber</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/akber007.jpg?forceidenticon=false&amp;dt=635046231000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by akber007</title><link>http://www.asp.net/web-api/overview/working-with-http/http-message-handlers</link><pubDate>Fri, 13 Apr 2012 11:58:55 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015320</guid><description><![CDATA[ <p>How to pass the parameter value as xml to the action method. Specially, when xml is of complex object type.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/akber007.jpg?forceidenticon=false&amp;dt=635046231000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by narunaram</title><link>http://www.asp.net/web-api/overview/working-with-http/http-message-handlers</link><pubDate>Mon, 28 May 2012 00:28:56 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015607</guid><description><![CDATA[ <p>A very nice series of articles. Great job Mike.</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/narunaram.jpg?forceidenticon=false&amp;dt=635046231000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by aliostad</title><link>http://www.asp.net/web-api/overview/working-with-http/http-message-handlers</link><pubDate>Tue, 05 Jun 2012 18:04:43 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015687</guid><description><![CDATA[ <p>Hi Mike, is it OK to use one of your diagrams in my blog with a reference to your post please?</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/aliostad.jpg?forceidenticon=false&amp;dt=635046231000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by thangchung</title><link>http://www.asp.net/web-api/overview/working-with-http/http-message-handlers</link><pubDate>Thu, 07 Jun 2012 01:51:31 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015707</guid><description><![CDATA[ <p>HTTP Message Handlers are really awesome. But I have an good question for you. In check api secret key example, how can we pass this key from client side? And if we write the client side page that contain the key inside it, so is it security? Because now users can browse source code and see this secret key. I just want to know is it have any another ways to make it work better or not?</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/thangchung.jpg?forceidenticon=false&amp;dt=635046231000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by MikeWasson</title><link>http://www.asp.net/web-api/overview/working-with-http/http-message-handlers</link><pubDate>Wed, 20 Jun 2012 01:35:39 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015809</guid><description><![CDATA[ <p>@aliostad: Sure!</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/MikeWasson.jpg?forceidenticon=false&amp;dt=635046231000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by Carel Blumenstock</title><link>http://www.asp.net/web-api/overview/working-with-http/http-message-handlers</link><pubDate>Thu, 12 Jul 2012 10:39:23 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000015960</guid><description><![CDATA[ <p>is it possible to intercept before requests hit the http server? (case: we want to use integrated windows authentication as well as other mechanisms but run into the effect of useWindowsAuthentication is a self hosted webapi)</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/Carel%20Blumenstock.jpg?forceidenticon=false&amp;dt=635046231000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by grahamehorner</title><link>http://www.asp.net/web-api/overview/working-with-http/http-message-handlers</link><pubDate>Tue, 21 Aug 2012 06:43:44 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016232</guid><description><![CDATA[ <p>Some nice examples; is there a way to have a MessageHander register dynamically base on the attribute of a ApiController or action similar to the filters?</p><p></p><p>For Example:</p><p></p><p>[AccessTokenMessageHandler(&quot;api_token&quot;)]</p><p>public class SecurityController : ApiController { }</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/grahamehorner.jpg?forceidenticon=false&amp;dt=635046231000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by lcd</title><link>http://www.asp.net/web-api/overview/working-with-http/http-message-handlers</link><pubDate>Wed, 05 Sep 2012 16:17:20 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016384</guid><description><![CDATA[ <p>// Connect client directly to server </p><p>HttpClient client = new HttpClient(config); </p><p></p><p>There maybe a typing error.</p><p>The correct maybe:</p><p>HttpClient client = new HttpClient(server);</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/lcd.jpg?forceidenticon=false&amp;dt=635046231000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by goneale</title><link>http://www.asp.net/web-api/overview/working-with-http/http-message-handlers</link><pubDate>Mon, 01 Oct 2012 21:28:48 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000016561</guid><description><![CDATA[ <p>Hi Mike,</p><p></p><p>I&#39;m receiving: &quot;The best overload for &#39;MapHttpRoute&#39; does not have a parameter named &#39;handler&#39;&quot; when attempting this with Web API (v4.0.20710.0)?</p>]]></description><enclosure length="0" type="image/png" url="http://i1.asp.net/avatar/goneale.jpg?forceidenticon=false&amp;dt=635046231000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by sunny r gupta</title><link>http://www.asp.net/web-api/overview/working-with-http/http-message-handlers</link><pubDate>Tue, 15 Jan 2013 23:48:28 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000018176</guid><description><![CDATA[ <p>Seems like almost all the topics that I am searching for nowadays, are being written by you :P</p><p>Thanks for all the great insight on these topics. Keep up the good work! :)</p>]]></description><enclosure length="0" type="image/png" url="http://i3.asp.net/avatar/sunny%20r%20gupta.jpg?forceidenticon=false&amp;dt=635046231000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by MikeWasson</title><link>http://www.asp.net/web-api/overview/working-with-http/http-message-handlers</link><pubDate>Thu, 17 Jan 2013 18:18:23 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000018196</guid><description><![CDATA[ <p>@grahamehorner: Not out of the box ... it might be possible to write such a thing</p><p>@goneale: It&#39;s defined in System.Web.Http.HttpRouteCollectionExtensions in System.Web.Http.dll</p><p>@sunny r gupta: Thanks!</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/MikeWasson.jpg?forceidenticon=false&amp;dt=635046231000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item><item><title>Comment Posted by manix007</title><link>http://www.asp.net/web-api/overview/working-with-http/http-message-handlers</link><pubDate>Thu, 11 Apr 2013 01:44:37 GMT</pubDate><guid isPermaLink="false">00000000-0000-0000-0000000018889</guid><description><![CDATA[ <p>Hi Mike,</p><p></p><p>I am 2 days old to WebAPI/ developing RESTful HTTP services. Could you please tell me some pointers how to handle the situation.</p><p></p><p>1. Normally all APIs will return HTTP 200, 201, 404, 400, 500 response codes as per the operation result</p><p>2. If the client adds &quot;?suppressHttpRequestCodes=true&quot; to any of the API, that call should always return 200 Response and in case of error there should be some detailed Error description JSON object attached to it.</p><p></p><p>Kindly help</p><p>~Mani.</p>]]></description><enclosure length="0" type="image/png" url="http://i2.asp.net/avatar/manix007.jpg?forceidenticon=false&amp;dt=635046231000000000&amp;enableAvatar=False&amp;cdn_id=2013-05-10-001" /></item></channel></rss>