93
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
109
<style type="text/css">
110
@import url("http://jakarta.apache.org/commons/style/tigris.css");
111
@import url("http://jakarta.apache.org/commons/style/maven.css");
112
@import url("http://jakarta.apache.org/commons/style/project.css");
114
<link rel="stylesheet" href="http://jakarta.apache.org/commons/style/print.css" type="text/css" media="print"></link>
117
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"></meta>
121
<meta name="author" content="Adrian Sutton"></meta>
122
<meta name="email" content="adrian@ephox.com"></meta>
129
<body class="composite">
132
<table border="0" width="100%" cellpadding="8" cellspacing="0">
147
<a href="http://jakarta.apache.org/">
148
<img border="0" name="organization-logo" alt="Apache Software Foundation" src="http://jakarta.apache.org/images/jakarta-logo.gif" align="left"></img>
155
<div id="login" align="right">
164
<a href="http://jakarta.apache.org/commons/httpclient/">
165
<img border="0" alt="HttpClient" src="../images/httpclient_logo.png" align="right"></img>
174
<script type="text/javascript">
176
var myWidth = 0, myHeight = 0;
177
if( typeof( window.innerWidth ) == 'number' ) {
179
myWidth = window.innerWidth;
180
myHeight = window.innerHeight;
181
} else if( document.documentElement &&
182
( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
183
//IE 6+ in 'standards compliant mode'
184
myWidth = document.documentElement.clientWidth;
185
myHeight = document.documentElement.clientHeight;
186
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
188
myWidth = document.body.clientWidth;
189
myHeight = document.body.clientHeight;
191
// window.alert( 'Width = ' + myWidth );
193
document['organization-logo'].src='http://jakarta.apache.org/images/original-jakarta-logo.gif';
198
<div id="breadcrumbs">
199
<table border="0" width="100%" cellpadding="4" cellspacing="0">
203
<td>Last published: May 7, 2006
221
<table border="0" width="100%" cellpadding="8" cellspacing="0">
223
<td width="20%" id="leftcol">
229
<strong>About Us</strong>
246
<a href="http://jakarta.apache.org/commons/" class="externalLink" title="External Link">Home</a>
269
<a href="http://jakarta.apache.org/commons/contributors.html" class="externalLink" title="External Link">Contributors</a>
292
<a href="http://jakarta.apache.org/commons/license.html" class="externalLink" title="External Link">License</a>
320
<a href="http://jakarta.apache.org/commons/components.html" class="externalLink" title="External Link">Components</a>
346
<a href="http://jakarta.apache.org/commons/sandbox/index.html" class="externalLink" title="External Link">Sandbox</a>
372
<a href="http://jakarta.apache.org/commons/dormant/index.html" class="externalLink" title="External Link">Dormant</a>
382
<strong>Overview</strong>
399
<a href="../2.0/index.html">HttpClient 2.0</a>
422
<a href="../features.html">Features</a>
445
<a href="../news.html">News</a>
468
<a href="../status.html">Status</a>
491
<a href="../downloads.html">Download</a>
514
<a href="http://wiki.apache.org/jakarta-httpclient/" class="externalLink" title="External Link">Wiki</a>
542
<a href="../userguide.html">User Guide</a>
562
<a href="../authentication.html">Authentication Guide</a>
585
<a href="../charencodings.html">Character Encodings</a>
608
<a href="../cookies.html">Cookies</a>
631
<a href="../exception-handling.html">Exception Handling</a>
654
<a href="../logging.html">Logging Guide</a>
677
<a href="../methods.html">Methods</a>
700
<a href="../performance.html">Optimization Guide</a>
723
<a href="../preference-api.html">Preference Architecture</a>
746
<a href="../redirects.html">Redirects Handling</a>
769
<a href="http://svn.apache.org/viewcvs.cgi/jakarta/commons/proper/httpclient/trunk/src/examples/" class="externalLink" title="External Link">Sample Code</a>
792
<a href="../sslguide.html">SSL Guide</a>
815
<a href="../threading.html">Threading</a>
838
<a href="../troubleshooting.html">Trouble Shooting</a>
861
<a href="../tutorial.html">Tutorial</a>
892
<a href="../developerguide.html">Developer Guide</a>
912
<a href="http://wiki.apache.org/jakarta-httpclient/HttpClientReleaseProcess" class="externalLink" title="External Link">Release Process</a>
927
<strong>Project Documentation</strong>
944
<a href="../index.html">About HttpClient</a>
972
<a href="../project-info.html">Project Info</a>
998
<a href="../maven-reports.html">Project Reports</a>
1019
<a href="http://maven.apache.org/development-process.html" class="externalLink" title="External Link">Development Process</a>
1031
<strong>General Information</strong>
1048
<a href="http://jakarta.apache.org/commons/charter.html" class="externalLink" title="External Link">Charter</a>
1071
<a href="http://jakarta.apache.org/commons/volunteering.html" class="externalLink" title="External Link">Volunteering</a>
1094
<a href="http://jakarta.apache.org/commons/patches.html" class="externalLink" title="External Link">Contributing Patches</a>
1117
<a href="http://jakarta.apache.org/commons/building.html" class="externalLink" title="External Link">Building Components</a>
1140
<a href="http://jakarta.apache.org/commons/releases/index.html" class="externalLink" title="External Link">Releasing Components</a>
1163
<a href="http://wiki.apache.org/jakarta-commons/FrontPage" class="externalLink" title="External Link">Wiki</a>
1174
<strong>Jakarta Community</strong>
1191
<a href="http://jakarta.apache.org/site/getinvolved.html" class="externalLink" title="External Link">Get Involved</a>
1214
<a href="http://jakarta.apache.org/site/mail.html" class="externalLink" title="External Link">Mailing Lists</a>
1225
<strong>Related</strong>
1242
<a href="http://db.apache.org/commons/" class="externalLink" title="External Link">DB Commons</a>
1265
<a href="http://xml.apache.org/commons/" class="externalLink" title="External Link">XML Commons</a>
1283
<div style="margin-top: 20px; width: 100%; text-align: center;">
1284
<a href="http://maven.apache.org/" title="Built by Maven"><img style="border: 1px solid black" alt="Built by Maven" src="../images/logos/maven-button-1.png"></img></a>
1301
<a name="Introduction">Introduction</a>
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><title>HttpClient - Put Method</title><style type="text/css" media="all">
2
@import url("../style/maven-base.css");
4
@import url("../style/maven-theme.css");@import url("../style/project.css");</style><link rel="stylesheet" href="../style/print.css" type="text/css" media="print"></link><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"></meta><meta name="author" content="Adrian Sutton"></meta><meta name="email" content="adrian@ephox.com"></meta></head><body class="composite"><div id="banner"><a href="http://jakarta.apache.org/" id="organizationLogo"><img alt="Apache Software Foundation" src="http://jakarta.apache.org/images/jakarta-logo.gif"></img></a><a href="http://jakarta.apache.org/httpcomponents/httpclient-3.x/" id="projectLogo"><img alt="HttpClient" src="../images/httpclient_logo.png"></img></a><div class="clear"><hr></hr></div></div><div id="breadcrumbs"><div class="xleft">Last published: 18 August 2007
5
<span class="separator">|</span>�Doc for 3.1
6
</div><div class="xright"></div><div class="clear"><hr></hr></div></div><div id="leftColumn"><div id="navcolumn"><div id="menuOverview"><h5>Overview</h5><ul><li class="none"><a href="../features.html">Features</a></li><li class="none"><a href="../news.html">News</a></li><li class="none"><a href="../status.html">Status</a></li><li class="none"><a href="../downloads.html">Download</a></li><li class="none"><a href="http://wiki.apache.org/jakarta-httpclient/" class="externalLink" title="External Link">Wiki</a></li><li class="expanded"><a href="../userguide.html">User Guide</a><ul><li class="none"><a href="../authentication.html">Authentication Guide</a></li><li class="none"><a href="../charencodings.html">Character Encodings</a></li><li class="none"><a href="../cookies.html">Cookies</a></li><li class="none"><a href="../exception-handling.html">Exception Handling</a></li><li class="none"><a href="../logging.html">Logging Guide</a></li><li class="none"><a href="../methods.html">Methods</a></li><li class="none"><a href="../performance.html">Optimization Guide</a></li><li class="none"><a href="../preference-api.html">Preference Architecture</a></li><li class="none"><a href="../redirects.html">Redirects Handling</a></li><li class="none"><a href="http://svn.apache.org/viewvc/jakarta/httpcomponents/oac.hc3x/trunk/src/examples/" class="externalLink" title="External Link">Sample Code</a></li><li class="none"><a href="../sslguide.html">SSL Guide</a></li><li class="none"><a href="../threading.html">Threading</a></li><li class="none"><a href="../troubleshooting.html">Trouble Shooting</a></li><li class="none"><a href="../tutorial.html">Tutorial</a></li></ul></li><li class="none"><a href="../developerguide.html">Developer Guide</a></li></ul></div><div id="menuProject_Documentation"><h5>Project Documentation</h5><ul><li class="none"><a href="../index.html">About</a></li><li class="collapsed"><a href="../project-info.html">Project Info</a></li><li class="collapsed"><a href="../maven-reports.html">Project Reports</a></li><li class="none"><a href="../development-process.html">Development Process</a></li></ul></div><div id="legend"><h5>Legend</h5><ul><li class="externalLink">External Link</li><li class="newWindow">Opens in a new window</li></ul></div><a href="http://maven.apache.org/" title="Built by Maven" id="poweredBy"><img alt="Built by Maven" src="../images/logos/mavenlogo_builtby_w.png"></img></a></div></div><div id="bodyColumn"><div class="contentBox"><div class="section"><a name="Introduction"></a><h2>Introduction</h2>
1304
7
<p>The PUT method requests that the enclosed entity be stored under the
1305
8
supplied URL. If the URL refers to an already existing resource, the
1306
9
enclosed entity <i>should</i> be considered as a modified version of the
1307
10
one residing on the origin server. If the URL does not point to an
1308
11
existing resource, and that URL is capable of being defined as a new
1309
12
resource by the requesting user agent, the origin server can create the
1310
resource with that URL.</p><p>If the request passes through a cache and the URL identifies one or
13
resource with that URL.</p>
15
<p>If the request passes through a cache and the URL identifies one or
1311
16
more currently cached entities, those entries <i>should</i> be treated as
1312
stale. Responses to this method are not cacheable.</p><p>The fundamental difference between <a href="post.html">POST</a> and
17
stale. Responses to this method are not cacheable.</p>
19
<p>The fundamental difference between <a href="post.html">POST</a> and
1313
20
PUT requests is reflected in the different meaning of the request URL.
1314
21
The URL in a POST request identifies the resource that will handle the
1315
22
enclosed entity. That resource might be a data-accepting process, a