<?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/"
		>
<channel>
	<title>Comments on: Using PUT and DELETE methods in AJAX requests with prototype.js</title>
	<atom:link href="http://dobrzanski.net/2007/04/22/using-put-and-delete-methods-in-ajax-requesta-with-prototypejs/feed/" rel="self" type="application/rss+xml" />
	<link>http://dobrzanski.net/2007/04/22/using-put-and-delete-methods-in-ajax-requesta-with-prototypejs/</link>
	<description>The blog for developers</description>
	<lastBuildDate>Sun, 05 Feb 2012 21:35:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: AJAX&#160;with Sharepoint &#124; SharePoint Tutorials</title>
		<link>http://dobrzanski.net/2007/04/22/using-put-and-delete-methods-in-ajax-requesta-with-prototypejs/comment-page-1/#comment-35202</link>
		<dc:creator>AJAX&#160;with Sharepoint &#124; SharePoint Tutorials</dc:creator>
		<pubDate>Sun, 16 May 2010 15:16:21 +0000</pubDate>
		<guid isPermaLink="false">http://dobrzanski.net/2007/04/22/using-put-and-delete-methods-in-ajax-requesta-with-prototypejs/#comment-35202</guid>
		<description>[...] Using PUT and DELETE methods in AJAX requests with prototype.js &#8230;&#160; [...]</description>
		<content:encoded><![CDATA[<p>[...] Using PUT and DELETE methods in AJAX requests with prototype.js &#8230;&nbsp; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabe da Silveira</title>
		<link>http://dobrzanski.net/2007/04/22/using-put-and-delete-methods-in-ajax-requesta-with-prototypejs/comment-page-1/#comment-24582</link>
		<dc:creator>Gabe da Silveira</dc:creator>
		<pubDate>Thu, 29 Oct 2009 23:42:17 +0000</pubDate>
		<guid isPermaLink="false">http://dobrzanski.net/2007/04/22/using-put-and-delete-methods-in-ajax-requesta-with-prototypejs/#comment-24582</guid>
		<description>There is a detail here that is incorrect.  POST is for creating new resources elements and PUT is for creating or updating.  The key difference is that PUT should be idempotent while POST is not.  So PUTing the same thing twice should not result in a different state, whereas POSTing the same thing may create multiple entries (or it may not, but nothing in the HTTP stack should assume it doesn&#039;t).</description>
		<content:encoded><![CDATA[<p>There is a detail here that is incorrect.  POST is for creating new resources elements and PUT is for creating or updating.  The key difference is that PUT should be idempotent while POST is not.  So PUTing the same thing twice should not result in a different state, whereas POSTing the same thing may create multiple entries (or it may not, but nothing in the HTTP stack should assume it doesn&#8217;t).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jarosław Dobrzański</title>
		<link>http://dobrzanski.net/2007/04/22/using-put-and-delete-methods-in-ajax-requesta-with-prototypejs/comment-page-1/#comment-19106</link>
		<dc:creator>Jarosław Dobrzański</dc:creator>
		<pubDate>Wed, 10 Jun 2009 11:25:43 +0000</pubDate>
		<guid isPermaLink="false">http://dobrzanski.net/2007/04/22/using-put-and-delete-methods-in-ajax-requesta-with-prototypejs/#comment-19106</guid>
		<description>Adomas - ggot point! I&#039;ll change it now :) 
Thanks!</description>
		<content:encoded><![CDATA[<p>Adomas &#8211; ggot point! I&#8217;ll change it now <img src='http://dobrzanski.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adomas</title>
		<link>http://dobrzanski.net/2007/04/22/using-put-and-delete-methods-in-ajax-requesta-with-prototypejs/comment-page-1/#comment-19104</link>
		<dc:creator>Adomas</dc:creator>
		<pubDate>Wed, 10 Jun 2009 10:24:08 +0000</pubDate>
		<guid isPermaLink="false">http://dobrzanski.net/2007/04/22/using-put-and-delete-methods-in-ajax-requesta-with-prototypejs/#comment-19104</guid>
		<description>A minor remark: REST stands for &quot;REpresentational State Transfer&quot;, not &quot;REpresenational State Browser&quot;.</description>
		<content:encoded><![CDATA[<p>A minor remark: REST stands for &#8220;REpresentational State Transfer&#8221;, not &#8220;REpresenational State Browser&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jarosław Dobrzański</title>
		<link>http://dobrzanski.net/2007/04/22/using-put-and-delete-methods-in-ajax-requesta-with-prototypejs/comment-page-1/#comment-9725</link>
		<dc:creator>Jarosław Dobrzański</dc:creator>
		<pubDate>Thu, 02 Oct 2008 09:38:12 +0000</pubDate>
		<guid isPermaLink="false">http://dobrzanski.net/2007/04/22/using-put-and-delete-methods-in-ajax-requesta-with-prototypejs/#comment-9725</guid>
		<description>Avramucz,
Teh example is provided in this post...
And my name is Jaroslaw ;)</description>
		<content:encoded><![CDATA[<p>Avramucz,<br />
Teh example is provided in this post&#8230;<br />
And my name is Jaroslaw <img src='http://dobrzanski.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: avramucz</title>
		<link>http://dobrzanski.net/2007/04/22/using-put-and-delete-methods-in-ajax-requesta-with-prototypejs/comment-page-1/#comment-9724</link>
		<dc:creator>avramucz</dc:creator>
		<pubDate>Thu, 02 Oct 2008 08:48:25 +0000</pubDate>
		<guid isPermaLink="false">http://dobrzanski.net/2007/04/22/using-put-and-delete-methods-in-ajax-requesta-with-prototypejs/#comment-9724</guid>
		<description>Hello Filip!

Could you provide some example code for REST service which processes PUT requests. I made it this way but it doesn&#039;t work. Tomcat returns HTTP error 405. (I use FF2.)

@PUT
@Path(&quot;/book/{id}&quot;)
public void updateBook(@PathParam(&quot;id&quot;) Integer id, @QueryParam(&quot;name&quot;) String name) {
    bookMap.put(id,name);
}

Thanks.</description>
		<content:encoded><![CDATA[<p>Hello Filip!</p>
<p>Could you provide some example code for REST service which processes PUT requests. I made it this way but it doesn&#8217;t work. Tomcat returns HTTP error 405. (I use FF2.)</p>
<p>@PUT<br />
@Path(&#8220;/book/{id}&#8221;)<br />
public void updateBook(@PathParam(&#8220;id&#8221;) Integer id, @QueryParam(&#8220;name&#8221;) String name) {<br />
    bookMap.put(id,name);<br />
}</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Theme</title>
		<link>http://dobrzanski.net/2007/04/22/using-put-and-delete-methods-in-ajax-requesta-with-prototypejs/comment-page-1/#comment-8227</link>
		<dc:creator>Theme</dc:creator>
		<pubDate>Wed, 20 Aug 2008 08:16:17 +0000</pubDate>
		<guid isPermaLink="false">http://dobrzanski.net/2007/04/22/using-put-and-delete-methods-in-ajax-requesta-with-prototypejs/#comment-8227</guid>
		<description>from: http://www.prototypejs.org/assets/2008/1/25/prototype-1.6.0.2.js.
Looks like they just emulating other methods(except get and post),
code fragment:
    if (![&#039;get&#039;, &#039;post&#039;].include(this.method)) {
      // simulate other verbs over post
      params[&#039;_method&#039;] = this.method;
      this.method = &#039;post&#039;;
    }

still looking for some simple web page for testing REST services...</description>
		<content:encoded><![CDATA[<p>from: <a href="http://www.prototypejs.org/assets/2008/1/25/prototype-1.6.0.2.js" rel="nofollow">http://www.prototypejs.org/assets/2008/1/25/prototype-1.6.0.2.js</a>.<br />
Looks like they just emulating other methods(except get and post),<br />
code fragment:<br />
    if (!['get', 'post'].include(this.method)) {<br />
      // simulate other verbs over post<br />
      params['_method'] = this.method;<br />
      this.method = &#8216;post&#8217;;<br />
    }</p>
<p>still looking for some simple web page for testing REST services&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pvincent</title>
		<link>http://dobrzanski.net/2007/04/22/using-put-and-delete-methods-in-ajax-requesta-with-prototypejs/comment-page-1/#comment-3307</link>
		<dc:creator>pvincent</dc:creator>
		<pubDate>Wed, 05 Mar 2008 11:24:43 +0000</pubDate>
		<guid isPermaLink="false">http://dobrzanski.net/2007/04/22/using-put-and-delete-methods-in-ajax-requesta-with-prototypejs/#comment-3307</guid>
		<description>Thanx for the tip.
It helps me a lot.</description>
		<content:encoded><![CDATA[<p>Thanx for the tip.<br />
It helps me a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jarosław Dobrzański</title>
		<link>http://dobrzanski.net/2007/04/22/using-put-and-delete-methods-in-ajax-requesta-with-prototypejs/comment-page-1/#comment-8</link>
		<dc:creator>Jarosław Dobrzański</dc:creator>
		<pubDate>Tue, 24 Apr 2007 16:51:06 +0000</pubDate>
		<guid isPermaLink="false">http://dobrzanski.net/2007/04/22/using-put-and-delete-methods-in-ajax-requesta-with-prototypejs/#comment-8</guid>
		<description>&lt;p&gt;Filip, you&#039;re absolutely right! If you fully support REST, to be more accurate during adding a resource, you must invoke Ajax.Request the manner you exposed.&lt;/p&gt;

&lt;p&gt;However, for this particular example, you can omit &quot;parameter&quot; section. So you can just write:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
new Ajax.Request(&#039;http://example.com/servlet/RESOURCE_URI&#039;,  
method:&#039;put&#039; });
&lt;/pre&gt;

&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Filip, you&#8217;re absolutely right! If you fully support REST, to be more accurate during adding a resource, you must invoke Ajax.Request the manner you exposed.</p>
<p>However, for this particular example, you can omit &#8220;parameter&#8221; section. So you can just write:</p>
<pre><code>
new Ajax.Request('http://example.com/servlet/RESOURCE_URI',
method:'put' });
</code></pre></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Filip Czaja</title>
		<link>http://dobrzanski.net/2007/04/22/using-put-and-delete-methods-in-ajax-requesta-with-prototypejs/comment-page-1/#comment-7</link>
		<dc:creator>Filip Czaja</dc:creator>
		<pubDate>Tue, 24 Apr 2007 14:58:47 +0000</pubDate>
		<guid isPermaLink="false">http://dobrzanski.net/2007/04/22/using-put-and-delete-methods-in-ajax-requesta-with-prototypejs/#comment-7</guid>
		<description>&lt;p&gt;Shouldn&#039;t AJAX Request for adding new resource, identified by RESOURCE_URI, via REST service look like this:
&lt;code&gt;
new Ajax.Request(&#039;http://example.com/servlet/RESOURCE_URI&#039;, {
    method:&#039;put&#039;,
    parameters:&#039;&#039;
});
&lt;/code&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Shouldn&#8217;t AJAX Request for adding new resource, identified by RESOURCE_URI, via REST service look like this:<br />
<code><br />
new Ajax.Request('http://example.com/servlet/RESOURCE_URI', {<br />
    method:'put',<br />
    parameters:''<br />
});<br />
</code></p>
]]></content:encoded>
	</item>
</channel>
</rss>

