<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Simple Webmachine Extension (1/4): PUT</title>
	<atom:link href="http://blog.beerriot.com/2009/04/22/simple-webmachine-put/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.beerriot.com/2009/04/22/simple-webmachine-put/</link>
	<description>The making of BeerRiot and other thoughts.</description>
	<lastBuildDate>Wed, 28 Oct 2009 04:17:24 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bryan</title>
		<link>http://blog.beerriot.com/2009/04/22/simple-webmachine-put/#comment-1487</link>
		<dc:creator>Bryan</dc:creator>
		<pubDate>Wed, 06 May 2009 23:32:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.beerriot.com/?p=130#comment-1487</guid>
		<description>Excellent - glad you&#039;re up and running.  Thanks for the feedback, and keep it coming - it&#039;s fun learning the quirks one has internalized when new hands pick up a tool.</description>
		<content:encoded><![CDATA[<p>Excellent &#8211; glad you&#8217;re up and running.  Thanks for the feedback, and keep it coming &#8211; it&#8217;s fun learning the quirks one has internalized when new hands pick up a tool.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wayfaring Stranger</title>
		<link>http://blog.beerriot.com/2009/04/22/simple-webmachine-put/#comment-1486</link>
		<dc:creator>Wayfaring Stranger</dc:creator>
		<pubDate>Wed, 06 May 2009 18:48:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.beerriot.com/?p=130#comment-1486</guid>
		<description>Wow, thanks for the quick reply.  I did finally notice the dispatch comment that I could copy to &quot;mywebdemo_sup.erl&quot; and got it all working.  This is blowing my mind!:)  I just LOVE the wmtrace facility and being able to see the Erlang evaluations.  Wow, just wow.  Now I need to think up a website to write in webmachine. :)</description>
		<content:encoded><![CDATA[<p>Wow, thanks for the quick reply.  I did finally notice the dispatch comment that I could copy to &#8220;mywebdemo_sup.erl&#8221; and got it all working.  This is blowing my mind!:)  I just LOVE the wmtrace facility and being able to see the Erlang evaluations.  Wow, just wow.  Now I need to think up a website to write in webmachine. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bryan</title>
		<link>http://blog.beerriot.com/2009/04/22/simple-webmachine-put/#comment-1485</link>
		<dc:creator>Bryan</dc:creator>
		<pubDate>Wed, 06 May 2009 17:46:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.beerriot.com/?p=130#comment-1485</guid>
		<description>Hey, Stranger.  You&#039;re right that my posts assume a little familiarity with Webmachine.  I try to help with the learning curve by giving pointers to the appropriate docs, but I see that failed in this case, because the Dispatch wiki page was out of date.  &quot;:get_path_info&quot; changed to just &quot;:path_info&quot; recently.  Sorry about that - Justin has just updated the page.

The reason that wrq:path_info/2 is returning &#039;undefined&#039; for you, though, is likely that this dispatch line for env_resource looks different than the line for the default demo resource webmachine creates.  If you go back to my previous post, you&#039;ll see three lines of comments at the top of env_resource.erl.  These are the dispatch lines you need (they tell Webmachine where to extract that &#039;env&#039; token from).

The dispatch for your webmachine instance is in mywebdemo_sup.erl (search for &quot;Dispatch&quot;).  Add the two lines from my post to that Dispatch list, recompile, restart, and you&#039;ll be set.  Note that if you&#039;ve copied the code from my examples into mywebdemo.erl, you&#039;ll want to replace &quot;env_resource&quot; in my example dispatches with &quot;mywebdemo&quot; in yours.

Warning to future readers: the last paragraph is incorrect if you downloaded Webmachine after this reply was written.  Dispatch configuration is now handled in priv/dispatch.conf.</description>
		<content:encoded><![CDATA[<p>Hey, Stranger.  You&#8217;re right that my posts assume a little familiarity with Webmachine.  I try to help with the learning curve by giving pointers to the appropriate docs, but I see that failed in this case, because the Dispatch wiki page was out of date.  &#8220;:get_path_info&#8221; changed to just &#8220;:path_info&#8221; recently.  Sorry about that &#8211; Justin has just updated the page.</p>
<p>The reason that wrq:path_info/2 is returning &#8216;undefined&#8217; for you, though, is likely that this dispatch line for env_resource looks different than the line for the default demo resource webmachine creates.  If you go back to my previous post, you&#8217;ll see three lines of comments at the top of env_resource.erl.  These are the dispatch lines you need (they tell Webmachine where to extract that &#8216;env&#8217; token from).</p>
<p>The dispatch for your webmachine instance is in mywebdemo_sup.erl (search for &#8220;Dispatch&#8221;).  Add the two lines from my post to that Dispatch list, recompile, restart, and you&#8217;ll be set.  Note that if you&#8217;ve copied the code from my examples into mywebdemo.erl, you&#8217;ll want to replace &#8220;env_resource&#8221; in my example dispatches with &#8220;mywebdemo&#8221; in yours.</p>
<p>Warning to future readers: the last paragraph is incorrect if you downloaded Webmachine after this reply was written.  Dispatch configuration is now handled in priv/dispatch.conf.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wayfaring Stranger</title>
		<link>http://blog.beerriot.com/2009/04/22/simple-webmachine-put/#comment-1484</link>
		<dc:creator>Wayfaring Stranger</dc:creator>
		<pubDate>Wed, 06 May 2009 15:04:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.beerriot.com/?p=130#comment-1484</guid>
		<description>Ok, for a newbie how do you get this INTO a webmachine?  Don&#039;t you need a &quot;.app&quot; and supervisors and all that (like mywebdemo does)?  Or is there a simpler command line that you use to start your server?

If I patch your resource into &quot;mywebdemo&quot;, &quot;wrq:path_info&quot; always returns &#039;undefined&#039;.  The Dispatch wiki page talks about &quot;wrq:path_tokens&quot;, &quot;wrq:get_path_info&quot;, and &quot;wrq:disp_path&quot;; but not &quot;wrq:path_info&quot;.

I think your post assumes familiarity w/ webmachine and I am trying to use your example to gain that .... kind of a catch22 for me :-(</description>
		<content:encoded><![CDATA[<p>Ok, for a newbie how do you get this INTO a webmachine?  Don&#8217;t you need a &#8220;.app&#8221; and supervisors and all that (like mywebdemo does)?  Or is there a simpler command line that you use to start your server?</p>
<p>If I patch your resource into &#8220;mywebdemo&#8221;, &#8220;wrq:path_info&#8221; always returns &#8216;undefined&#8217;.  The Dispatch wiki page talks about &#8220;wrq:path_tokens&#8221;, &#8220;wrq:get_path_info&#8221;, and &#8220;wrq:disp_path&#8221;; but not &#8220;wrq:path_info&#8221;.</p>
<p>I think your post assumes familiarity w/ webmachine and I am trying to use your example to gain that &#8230;. kind of a catch22 for me <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
