~ubuntu-branches/ubuntu/precise/commons-httpclient/precise-updates

« back to all changes in this revision

Viewing changes to docs/methods/put.html

  • Committer: Bazaar Package Importer
  • Author(s): Kumar Appaiah
  • Date: 2008-04-18 13:25:36 UTC
  • mfrom: (3.1.1 hardy)
  • Revision ID: james.westby@ubuntu.com-20080418132536-404lhdow885492ho
Tags: 3.1-2
* debian/watch:
  + Update to reflect new upstream mirror structure.
    (Closes: #459995)
* debian/control:
  + Update my e-mail address to akumar@debian.org.
  + Standards Version is now 3.7.3.
  + Use Vcs-Svn and Vcs-Browser in place of XS-Vcs-*.
  + Depend on ant 1.6.5 and above, instead of 1.6.5-1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
  
3
 
 
4
 
  
5
 
  
6
 
 
7
 
  
8
 
  
9
 
 
10
 
  
11
 
 
12
 
  
13
 
  
14
 
 
15
 
  
16
 
  
17
 
 
18
 
  
19
 
  
20
 
 
21
 
  
22
 
 
23
 
  
24
 
 
25
 
  
26
 
 
27
 
  
28
 
 
29
 
  
30
 
 
31
 
  
32
 
  
33
 
  
34
 
  
35
 
      
36
 
  
37
 
 
38
 
      
39
 
      
40
 
      
41
 
      
42
 
      
43
 
      
44
 
        
45
 
         
46
 
      
47
 
      
48
 
 
49
 
      
50
 
      
51
 
      
52
 
      
53
 
 
54
 
      
55
 
      
56
 
      
57
 
 
58
 
      
59
 
 
60
 
  
61
 
  
62
 
 
63
 
  
64
 
  
65
 
 
66
 
   
67
 
   
68
 
 
69
 
   
70
 
   
71
 
 
72
 
  
73
 
  
74
 
  
75
 
 
76
 
 
77
 
 
78
 
    
79
 
        
80
 
        
81
 
 
82
 
    
83
 
    
84
 
 
85
 
    
86
 
    
87
 
      
88
 
      
89
 
    
90
 
      
91
 
        
92
 
        
93
 
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
94
 
 
95
 
    <html>
96
 
      <head>
97
 
        
98
 
        
99
 
        
100
 
          <title>HttpClient - 
101
 
          Put Method
102
 
        </title>
103
 
        
104
 
        
105
 
        
106
 
        
107
 
 
108
 
        
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");
113
 
           </style>
114
 
          <link rel="stylesheet" href="http://jakarta.apache.org/commons/style/print.css" type="text/css" media="print"></link>
115
 
        
116
 
 
117
 
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"></meta>
118
 
 
119
 
 
120
 
       
121
 
          <meta name="author" content="Adrian Sutton"></meta>
122
 
          <meta name="email" content="adrian@ephox.com"></meta>
123
 
        
124
 
        
125
 
        
126
 
        
127
 
      </head>
128
 
 
129
 
      <body class="composite">
130
 
 
131
 
        <div id="banner">
132
 
          <table border="0" width="100%" cellpadding="8" cellspacing="0">
133
 
            <tr>
134
 
              
135
 
              <td>
136
 
                
137
 
                
138
 
                  
139
 
                  
140
 
                  
141
 
                    
142
 
                  
143
 
                  
144
 
                  
145
 
                  
146
 
                  
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>
149
 
                  </a>
150
 
                
151
 
              </td>
152
 
 
153
 
              
154
 
              <td>
155
 
                <div id="login" align="right">
156
 
                  
157
 
                  
158
 
                    
159
 
                    
160
 
                    
161
 
                      
162
 
                    
163
 
 
164
 
                    <a href="http://jakarta.apache.org/commons/httpclient/">
165
 
                      <img border="0" alt="HttpClient" src="../images/httpclient_logo.png" align="right"></img>
166
 
                    </a>
167
 
                  
168
 
                </div>
169
 
              </td>
170
 
            </tr>
171
 
          </table>
172
 
        </div>
173
 
 
174
 
<script type="text/javascript">
175
 
<!--
176
 
  var myWidth = 0, myHeight = 0;
177
 
  if( typeof( window.innerWidth ) == 'number' ) {
178
 
    //Non-IE
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 ) ) {
187
 
    //IE 4 compatible
188
 
    myWidth = document.body.clientWidth;
189
 
    myHeight = document.body.clientHeight;
190
 
  }
191
 
  // window.alert( 'Width = ' + myWidth );
192
 
  if (myWidth < 850) {
193
 
    document['organization-logo'].src='http://jakarta.apache.org/images/original-jakarta-logo.gif';
194
 
  }
195
 
// -->
196
 
</script>
197
 
 
198
 
        <div id="breadcrumbs">
199
 
          <table border="0" width="100%" cellpadding="4" cellspacing="0">
200
 
            <tr>
201
 
              
202
 
                
203
 
                <td>Last published: May 7, 2006
204
 
                  | Doc for 3.0.1
205
 
                </td>
206
 
              
207
 
              <td>
208
 
                <div align="right">
209
 
                  
210
 
                  
211
 
                  
212
 
                  
213
 
                    
214
 
                  
215
 
                </div>
216
 
              </td>
217
 
            </tr>
218
 
          </table>
219
 
        </div>
220
 
        
221
 
        <table border="0" width="100%" cellpadding="8" cellspacing="0"> 
222
 
          <tr valign="top">
223
 
            <td width="20%" id="leftcol">
224
 
              <div id="navcolumn">
225
 
                
226
 
 
227
 
                                
228
 
    <div>
229
 
      <strong>About Us</strong>
230
 
      
231
 
    
232
 
    
233
 
    
234
 
    
235
 
        
236
 
        
237
 
        
238
 
        
239
 
        
240
 
                   
241
 
        
242
 
    <div>
243
 
      <small>
244
 
        
245
 
        
246
 
                <a href="http://jakarta.apache.org/commons/" class="externalLink" title="External Link">Home</a>
247
 
        
248
 
      </small>
249
 
          
250
 
        
251
 
      
252
 
    </div>
253
 
  
254
 
    
255
 
    
256
 
    
257
 
    
258
 
        
259
 
        
260
 
        
261
 
        
262
 
        
263
 
                   
264
 
        
265
 
    <div>
266
 
      <small>
267
 
        
268
 
        
269
 
                <a href="http://jakarta.apache.org/commons/contributors.html" class="externalLink" title="External Link">Contributors</a>
270
 
        
271
 
      </small>
272
 
          
273
 
        
274
 
      
275
 
    </div>
276
 
  
277
 
    
278
 
    
279
 
    
280
 
    
281
 
        
282
 
        
283
 
        
284
 
        
285
 
        
286
 
                   
287
 
        
288
 
    <div>
289
 
      <small>
290
 
        
291
 
        
292
 
                <a href="http://jakarta.apache.org/commons/license.html" class="externalLink" title="External Link">License</a>
293
 
        
294
 
      </small>
295
 
          
296
 
        
297
 
      
298
 
    </div>
299
 
  
300
 
    
301
 
    
302
 
    
303
 
    
304
 
        
305
 
        
306
 
        
307
 
        
308
 
        
309
 
                
310
 
                
311
 
          
312
 
                
313
 
        
314
 
                   
315
 
        
316
 
    <div>
317
 
      <small>
318
 
        
319
 
        
320
 
                <a href="http://jakarta.apache.org/commons/components.html" class="externalLink" title="External Link">Components</a>
321
 
        
322
 
      </small>
323
 
          
324
 
    </div>
325
 
  
326
 
    
327
 
    
328
 
    
329
 
    
330
 
        
331
 
        
332
 
        
333
 
        
334
 
        
335
 
                
336
 
                
337
 
          
338
 
                
339
 
        
340
 
                   
341
 
        
342
 
    <div>
343
 
      <small>
344
 
        
345
 
        
346
 
                <a href="http://jakarta.apache.org/commons/sandbox/index.html" class="externalLink" title="External Link">Sandbox</a>
347
 
        
348
 
      </small>
349
 
          
350
 
    </div>
351
 
  
352
 
    
353
 
    
354
 
    
355
 
    
356
 
        
357
 
        
358
 
        
359
 
        
360
 
        
361
 
                
362
 
                
363
 
          
364
 
                
365
 
        
366
 
                   
367
 
        
368
 
    <div>
369
 
      <small>
370
 
        
371
 
        
372
 
                <a href="http://jakarta.apache.org/commons/dormant/index.html" class="externalLink" title="External Link">Dormant</a>
373
 
        
374
 
      </small>
375
 
          
376
 
    </div>
377
 
  
378
 
    </div>
379
 
  
380
 
                
381
 
    <div>
382
 
      <strong>Overview</strong>
383
 
      
384
 
    
385
 
    
386
 
    
387
 
    
388
 
        
389
 
        
390
 
        
391
 
        
392
 
        
393
 
                   
394
 
        
395
 
    <div>
396
 
      <small>
397
 
        
398
 
        
399
 
                <a href="../2.0/index.html">HttpClient 2.0</a>
400
 
        
401
 
      </small>
402
 
          
403
 
        
404
 
      
405
 
    </div>
406
 
  
407
 
    
408
 
    
409
 
    
410
 
    
411
 
        
412
 
        
413
 
        
414
 
        
415
 
        
416
 
                   
417
 
        
418
 
    <div>
419
 
      <small>
420
 
        
421
 
        
422
 
                <a href="../features.html">Features</a>
423
 
        
424
 
      </small>
425
 
          
426
 
        
427
 
      
428
 
    </div>
429
 
  
430
 
    
431
 
    
432
 
    
433
 
    
434
 
        
435
 
        
436
 
        
437
 
        
438
 
        
439
 
                   
440
 
        
441
 
    <div>
442
 
      <small>
443
 
        
444
 
        
445
 
                <a href="../news.html">News</a>
446
 
        
447
 
      </small>
448
 
          
449
 
        
450
 
      
451
 
    </div>
452
 
  
453
 
    
454
 
    
455
 
    
456
 
    
457
 
        
458
 
        
459
 
        
460
 
        
461
 
        
462
 
                   
463
 
        
464
 
    <div>
465
 
      <small>
466
 
        
467
 
        
468
 
                <a href="../status.html">Status</a>
469
 
        
470
 
      </small>
471
 
          
472
 
        
473
 
      
474
 
    </div>
475
 
  
476
 
    
477
 
    
478
 
    
479
 
    
480
 
        
481
 
        
482
 
        
483
 
        
484
 
        
485
 
                   
486
 
        
487
 
    <div>
488
 
      <small>
489
 
        
490
 
        
491
 
                <a href="../downloads.html">Download</a>
492
 
        
493
 
      </small>
494
 
          
495
 
        
496
 
      
497
 
    </div>
498
 
  
499
 
    
500
 
    
501
 
    
502
 
    
503
 
        
504
 
        
505
 
        
506
 
        
507
 
        
508
 
                   
509
 
        
510
 
    <div>
511
 
      <small>
512
 
        
513
 
        
514
 
                <a href="http://wiki.apache.org/jakarta-httpclient/" class="externalLink" title="External Link">Wiki</a>
515
 
        
516
 
      </small>
517
 
          
518
 
        
519
 
      
520
 
    </div>
521
 
  
522
 
    
523
 
    
524
 
    
525
 
    
526
 
        
527
 
        
528
 
        
529
 
        
530
 
        
531
 
                
532
 
          
533
 
                
534
 
                
535
 
        
536
 
                   
537
 
        
538
 
    <div>
539
 
      <small>
540
 
        
541
 
        
542
 
                <a href="../userguide.html">User Guide</a>
543
 
        
544
 
      </small>
545
 
          
546
 
        
547
 
    
548
 
    
549
 
    
550
 
    
551
 
        
552
 
        
553
 
        
554
 
        
555
 
        
556
 
                   
557
 
        
558
 
    <div>
559
 
      <small>
560
 
        
561
 
        
562
 
                <a href="../authentication.html">Authentication Guide</a>
563
 
        
564
 
      </small>
565
 
          
566
 
        
567
 
      
568
 
    </div>
569
 
  
570
 
    
571
 
    
572
 
    
573
 
    
574
 
        
575
 
        
576
 
        
577
 
        
578
 
        
579
 
                   
580
 
        
581
 
    <div>
582
 
      <small>
583
 
        
584
 
        
585
 
                <a href="../charencodings.html">Character Encodings</a>
586
 
        
587
 
      </small>
588
 
          
589
 
        
590
 
      
591
 
    </div>
592
 
  
593
 
    
594
 
    
595
 
    
596
 
    
597
 
        
598
 
        
599
 
        
600
 
        
601
 
        
602
 
                   
603
 
        
604
 
    <div>
605
 
      <small>
606
 
        
607
 
        
608
 
                <a href="../cookies.html">Cookies</a>
609
 
        
610
 
      </small>
611
 
          
612
 
        
613
 
      
614
 
    </div>
615
 
  
616
 
    
617
 
    
618
 
    
619
 
    
620
 
        
621
 
        
622
 
        
623
 
        
624
 
        
625
 
                   
626
 
        
627
 
    <div>
628
 
      <small>
629
 
        
630
 
        
631
 
                <a href="../exception-handling.html">Exception Handling</a>
632
 
        
633
 
      </small>
634
 
          
635
 
        
636
 
      
637
 
    </div>
638
 
  
639
 
    
640
 
    
641
 
    
642
 
    
643
 
        
644
 
        
645
 
        
646
 
        
647
 
        
648
 
                   
649
 
        
650
 
    <div>
651
 
      <small>
652
 
        
653
 
        
654
 
                <a href="../logging.html">Logging Guide</a>
655
 
        
656
 
      </small>
657
 
          
658
 
        
659
 
      
660
 
    </div>
661
 
  
662
 
    
663
 
    
664
 
    
665
 
    
666
 
        
667
 
        
668
 
        
669
 
        
670
 
        
671
 
                   
672
 
        
673
 
    <div>
674
 
      <small>
675
 
        
676
 
        
677
 
                <a href="../methods.html">Methods</a>
678
 
        
679
 
      </small>
680
 
          
681
 
        
682
 
      
683
 
    </div>
684
 
  
685
 
    
686
 
    
687
 
    
688
 
    
689
 
        
690
 
        
691
 
        
692
 
        
693
 
        
694
 
                   
695
 
        
696
 
    <div>
697
 
      <small>
698
 
        
699
 
        
700
 
                <a href="../performance.html">Optimization Guide</a>
701
 
        
702
 
      </small>
703
 
          
704
 
        
705
 
      
706
 
    </div>
707
 
  
708
 
    
709
 
    
710
 
    
711
 
    
712
 
        
713
 
        
714
 
        
715
 
        
716
 
        
717
 
                   
718
 
        
719
 
    <div>
720
 
      <small>
721
 
        
722
 
        
723
 
                <a href="../preference-api.html">Preference Architecture</a>
724
 
        
725
 
      </small>
726
 
          
727
 
        
728
 
      
729
 
    </div>
730
 
  
731
 
    
732
 
    
733
 
    
734
 
    
735
 
        
736
 
        
737
 
        
738
 
        
739
 
        
740
 
                   
741
 
        
742
 
    <div>
743
 
      <small>
744
 
        
745
 
        
746
 
                <a href="../redirects.html">Redirects Handling</a>
747
 
        
748
 
      </small>
749
 
          
750
 
        
751
 
      
752
 
    </div>
753
 
  
754
 
    
755
 
    
756
 
    
757
 
    
758
 
        
759
 
        
760
 
        
761
 
        
762
 
        
763
 
                   
764
 
        
765
 
    <div>
766
 
      <small>
767
 
        
768
 
        
769
 
                <a href="http://svn.apache.org/viewcvs.cgi/jakarta/commons/proper/httpclient/trunk/src/examples/" class="externalLink" title="External Link">Sample Code</a>
770
 
        
771
 
      </small>
772
 
          
773
 
        
774
 
      
775
 
    </div>
776
 
  
777
 
    
778
 
    
779
 
    
780
 
    
781
 
        
782
 
        
783
 
        
784
 
        
785
 
        
786
 
                   
787
 
        
788
 
    <div>
789
 
      <small>
790
 
        
791
 
        
792
 
                <a href="../sslguide.html">SSL Guide</a>
793
 
        
794
 
      </small>
795
 
          
796
 
        
797
 
      
798
 
    </div>
799
 
  
800
 
    
801
 
    
802
 
    
803
 
    
804
 
        
805
 
        
806
 
        
807
 
        
808
 
        
809
 
                   
810
 
        
811
 
    <div>
812
 
      <small>
813
 
        
814
 
        
815
 
                <a href="../threading.html">Threading</a>
816
 
        
817
 
      </small>
818
 
          
819
 
        
820
 
      
821
 
    </div>
822
 
  
823
 
    
824
 
    
825
 
    
826
 
    
827
 
        
828
 
        
829
 
        
830
 
        
831
 
        
832
 
                   
833
 
        
834
 
    <div>
835
 
      <small>
836
 
        
837
 
        
838
 
                <a href="../troubleshooting.html">Trouble Shooting</a>
839
 
        
840
 
      </small>
841
 
          
842
 
        
843
 
      
844
 
    </div>
845
 
  
846
 
    
847
 
    
848
 
    
849
 
    
850
 
        
851
 
        
852
 
        
853
 
        
854
 
        
855
 
                   
856
 
        
857
 
    <div>
858
 
      <small>
859
 
        
860
 
        
861
 
                <a href="../tutorial.html">Tutorial</a>
862
 
        
863
 
      </small>
864
 
          
865
 
        
866
 
      
867
 
    </div>
868
 
  
869
 
      
870
 
    </div>
871
 
  
872
 
    
873
 
    
874
 
    
875
 
    
876
 
        
877
 
        
878
 
        
879
 
        
880
 
        
881
 
                
882
 
          
883
 
                
884
 
                
885
 
        
886
 
                   
887
 
        
888
 
    <div>
889
 
      <small>
890
 
        
891
 
        
892
 
                <a href="../developerguide.html">Developer Guide</a>
893
 
        
894
 
      </small>
895
 
          
896
 
        
897
 
    
898
 
    
899
 
    
900
 
    
901
 
        
902
 
        
903
 
        
904
 
        
905
 
        
906
 
                   
907
 
        
908
 
    <div>
909
 
      <small>
910
 
        
911
 
        
912
 
                <a href="http://wiki.apache.org/jakarta-httpclient/HttpClientReleaseProcess" class="externalLink" title="External Link">Release Process</a>
913
 
        
914
 
      </small>
915
 
          
916
 
        
917
 
      
918
 
    </div>
919
 
  
920
 
      
921
 
    </div>
922
 
  
923
 
    </div>
924
 
  
925
 
                                
926
 
    <div>
927
 
      <strong>Project Documentation</strong>
928
 
      
929
 
    
930
 
    
931
 
    
932
 
    
933
 
        
934
 
        
935
 
        
936
 
        
937
 
        
938
 
                   
939
 
        
940
 
    <div>
941
 
      <small>
942
 
        
943
 
        
944
 
                <a href="../index.html">About HttpClient</a>
945
 
        
946
 
      </small>
947
 
          
948
 
        
949
 
      
950
 
    </div>
951
 
  
952
 
    
953
 
    
954
 
    
955
 
    
956
 
        
957
 
        
958
 
        
959
 
        
960
 
        
961
 
                
962
 
                
963
 
          
964
 
                
965
 
        
966
 
                   
967
 
        
968
 
    <div>
969
 
      <small>
970
 
        
971
 
        
972
 
                <a href="../project-info.html">Project Info</a>
973
 
        
974
 
      </small>
975
 
          
976
 
    </div>
977
 
  
978
 
    
979
 
    
980
 
    
981
 
    
982
 
        
983
 
        
984
 
        
985
 
        
986
 
        
987
 
                
988
 
                
989
 
          
990
 
                
991
 
        
992
 
                   
993
 
        
994
 
    <div>
995
 
      <small>
996
 
        
997
 
        
998
 
                <a href="../maven-reports.html">Project Reports</a>
999
 
        
1000
 
      </small>
1001
 
          
1002
 
    </div>
1003
 
  
1004
 
    
1005
 
    
1006
 
    
1007
 
    
1008
 
        
1009
 
        
1010
 
        
1011
 
        
1012
 
        
1013
 
                   
1014
 
        
1015
 
    <div>
1016
 
      <small>
1017
 
        
1018
 
        
1019
 
                <a href="http://maven.apache.org/development-process.html" class="externalLink" title="External Link">Development Process</a>
1020
 
        
1021
 
      </small>
1022
 
          
1023
 
        
1024
 
      
1025
 
    </div>
1026
 
  
1027
 
    </div>
1028
 
  
1029
 
                
1030
 
    <div>
1031
 
      <strong>General Information</strong>
1032
 
      
1033
 
    
1034
 
    
1035
 
    
1036
 
    
1037
 
        
1038
 
        
1039
 
        
1040
 
        
1041
 
        
1042
 
                   
1043
 
        
1044
 
    <div>
1045
 
      <small>
1046
 
        
1047
 
        
1048
 
                <a href="http://jakarta.apache.org/commons/charter.html" class="externalLink" title="External Link">Charter</a>
1049
 
        
1050
 
      </small>
1051
 
          
1052
 
        
1053
 
      
1054
 
    </div>
1055
 
  
1056
 
    
1057
 
    
1058
 
    
1059
 
    
1060
 
        
1061
 
        
1062
 
        
1063
 
        
1064
 
        
1065
 
                   
1066
 
        
1067
 
    <div>
1068
 
      <small>
1069
 
        
1070
 
        
1071
 
                <a href="http://jakarta.apache.org/commons/volunteering.html" class="externalLink" title="External Link">Volunteering</a>
1072
 
        
1073
 
      </small>
1074
 
          
1075
 
        
1076
 
      
1077
 
    </div>
1078
 
  
1079
 
    
1080
 
    
1081
 
    
1082
 
    
1083
 
        
1084
 
        
1085
 
        
1086
 
        
1087
 
        
1088
 
                   
1089
 
        
1090
 
    <div>
1091
 
      <small>
1092
 
        
1093
 
        
1094
 
                <a href="http://jakarta.apache.org/commons/patches.html" class="externalLink" title="External Link">Contributing Patches</a>
1095
 
        
1096
 
      </small>
1097
 
          
1098
 
        
1099
 
      
1100
 
    </div>
1101
 
  
1102
 
    
1103
 
    
1104
 
    
1105
 
    
1106
 
        
1107
 
        
1108
 
        
1109
 
        
1110
 
        
1111
 
                   
1112
 
        
1113
 
    <div>
1114
 
      <small>
1115
 
        
1116
 
        
1117
 
                <a href="http://jakarta.apache.org/commons/building.html" class="externalLink" title="External Link">Building Components</a>
1118
 
        
1119
 
      </small>
1120
 
          
1121
 
        
1122
 
      
1123
 
    </div>
1124
 
  
1125
 
    
1126
 
    
1127
 
    
1128
 
    
1129
 
        
1130
 
        
1131
 
        
1132
 
        
1133
 
        
1134
 
                   
1135
 
        
1136
 
    <div>
1137
 
      <small>
1138
 
        
1139
 
        
1140
 
                <a href="http://jakarta.apache.org/commons/releases/index.html" class="externalLink" title="External Link">Releasing Components</a>
1141
 
        
1142
 
      </small>
1143
 
          
1144
 
        
1145
 
      
1146
 
    </div>
1147
 
  
1148
 
    
1149
 
    
1150
 
    
1151
 
    
1152
 
        
1153
 
        
1154
 
        
1155
 
        
1156
 
        
1157
 
                   
1158
 
        
1159
 
    <div>
1160
 
      <small>
1161
 
        
1162
 
        
1163
 
                <a href="http://wiki.apache.org/jakarta-commons/FrontPage" class="externalLink" title="External Link">Wiki</a>
1164
 
        
1165
 
      </small>
1166
 
          
1167
 
        
1168
 
      
1169
 
    </div>
1170
 
  
1171
 
    </div>
1172
 
  
1173
 
    <div>
1174
 
      <strong>Jakarta Community</strong>
1175
 
      
1176
 
    
1177
 
    
1178
 
    
1179
 
    
1180
 
        
1181
 
        
1182
 
        
1183
 
        
1184
 
        
1185
 
                   
1186
 
        
1187
 
    <div>
1188
 
      <small>
1189
 
        
1190
 
        
1191
 
                <a href="http://jakarta.apache.org/site/getinvolved.html" class="externalLink" title="External Link">Get Involved</a>
1192
 
        
1193
 
      </small>
1194
 
          
1195
 
        
1196
 
      
1197
 
    </div>
1198
 
  
1199
 
    
1200
 
    
1201
 
    
1202
 
    
1203
 
        
1204
 
        
1205
 
        
1206
 
        
1207
 
        
1208
 
                   
1209
 
        
1210
 
    <div>
1211
 
      <small>
1212
 
        
1213
 
        
1214
 
                <a href="http://jakarta.apache.org/site/mail.html" class="externalLink" title="External Link">Mailing Lists</a>
1215
 
        
1216
 
      </small>
1217
 
          
1218
 
        
1219
 
      
1220
 
    </div>
1221
 
  
1222
 
    </div>
1223
 
  
1224
 
    <div>
1225
 
      <strong>Related</strong>
1226
 
      
1227
 
    
1228
 
    
1229
 
    
1230
 
    
1231
 
        
1232
 
        
1233
 
        
1234
 
        
1235
 
        
1236
 
                   
1237
 
        
1238
 
    <div>
1239
 
      <small>
1240
 
        
1241
 
        
1242
 
                <a href="http://db.apache.org/commons/" class="externalLink" title="External Link">DB Commons</a>
1243
 
        
1244
 
      </small>
1245
 
          
1246
 
        
1247
 
      
1248
 
    </div>
1249
 
  
1250
 
    
1251
 
    
1252
 
    
1253
 
    
1254
 
        
1255
 
        
1256
 
        
1257
 
        
1258
 
        
1259
 
                   
1260
 
        
1261
 
    <div>
1262
 
      <small>
1263
 
        
1264
 
        
1265
 
                <a href="http://xml.apache.org/commons/" class="externalLink" title="External Link">XML Commons</a>
1266
 
        
1267
 
      </small>
1268
 
          
1269
 
        
1270
 
      
1271
 
    </div>
1272
 
  
1273
 
    </div>
1274
 
  
1275
 
 
1276
 
                
1277
 
                
1278
 
 
1279
 
                
1280
 
                
1281
 
                
1282
 
                
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>
1285
 
                        </div>
1286
 
                
1287
 
              
1288
 
                
1289
 
              </div>
1290
 
            </td>
1291
 
            <td rowspan="2">
1292
 
              <div id="bodycol">
1293
 
                
1294
 
                <div class="app">
1295
 
                  
1296
 
                  
1297
 
    <div class="h3">
1298
 
      
1299
 
      
1300
 
        <h3>
1301
 
          <a name="Introduction">Introduction</a>
1302
 
        </h3>
1303
 
      
 
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");
 
3
          
 
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>
 
14
 
 
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>
 
18
 
 
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
1317
24
      annotations.  In contrast, the URL in a PUT request identifies the entity
1318
25
      enclosed with the request -- the user agent knows what URL is intended
1319
26
      and the server <b>must not</b> attempt to apply the request to some other
1320
 
      resource.</p><p>Unless otherwise specified for a particular entity-header, the
 
27
      resource.</p>
 
28
 
 
29
      <p>Unless otherwise specified for a particular entity-header, the
1321
30
      entity-headers in the PUT request <i>should</i> be applied to the
1322
31
      resource created or modified by the PUT.</p>
1323
 
    </div>
1324
 
  
1325
 
    <div class="h3">
1326
 
      
1327
 
      
1328
 
        <h3>
1329
 
          <a name="Typical Usage">Typical Usage</a>
1330
 
        </h3>
1331
 
      
 
32
    </div><div class="section"><a name="Typical_Usage"></a><h2>Typical Usage</h2>
1332
33
      <p>The put method is very simple, it takes a URL to put to and requires
1333
34
      that the body of the request method be set to the data to upload.  The
1334
35
      body can be set with an input stream or a string.</p>
1335
 
    <div id="source">
1336
 
      <pre>
 
36
 
 
37
      
 
38
    <div class="source"><pre>
1337
39
        PutMethod put = new PutMethod("http://jakarta.apache.org");
1338
40
        put.setRequestBody(new FileInputStream("UploadMe.gif"));
1339
41
        // execute the method and handle any error responses.
1342
44
        // 200, but may also be 201 Created, 204 No Content or any of the other
1343
45
        // 2xx range responses.
1344
46
      
1345
 
      </pre>
1346
 
    </div>
1347
 
  
1348
 
    </div>
1349
 
  
1350
 
    <div class="h3">
1351
 
      
1352
 
      
1353
 
        <h3>
1354
 
          <a name="Common Problems">Common Problems</a>
1355
 
        </h3>
1356
 
      
 
47
      </pre></div>
 
48
  
 
49
    </div><div class="section"><a name="Common_Problems"></a><h2>Common Problems</h2>
1357
50
      <p>The PUT method is not widely supported on public servers due to
1358
51
      security concerns and generally FTP is used to upload new and modified
1359
52
      files to the webserver.  Before executing a PUT method on a URL, it may
1360
53
      be worth checking that PUT is supported using the <a href="options.html">OPTIONS</a> method.</p>
1361
 
    </div>
1362
 
  
1363
 
    <div class="h3">
1364
 
      
1365
 
      
1366
 
        <h3>
1367
 
          <a name="RFC Section">RFC Section</a>
1368
 
        </h3>
1369
 
      
1370
 
      <p>The put method is defined in section 9.6 of <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC2616</a>.</p>
1371
 
    </div>
1372
 
  
1373
 
                  
1374
 
                  
1375
 
                  
1376
 
                  
1377
 
                  
1378
 
                </div>
1379
 
              </div>
1380
 
            </td>
1381
 
          </tr>
1382
 
        </table>
1383
 
        <div id="footer">
1384
 
          <table border="0" style="width:100%" cellpadding="4" cellspacing="0">
1385
 
            
1386
 
            <tr>
1387
 
              <td>
1388
 
                
1389
 
                  
1390
 
                    
1391
 
                    
1392
 
                      � 2001-2006, Apache Software Foundation
1393
 
                    
1394
 
                  
1395
 
                  
1396
 
                
1397
 
 
1398
 
                
1399
 
              </td>
1400
 
              
1401
 
            </tr>
1402
 
          </table>
1403
 
        </div>
1404
 
      </body>
1405
 
    </html>
1406
 
  
 
54
    </div><div class="section"><a name="RFC_Section"></a><h2>RFC Section</h2>
 
55
        <p>The put method is defined in section 9.6 of <a href="http://www.ietf.org/rfc/rfc2616.txt" class="externalLink" title="External Link">RFC2616</a>.</p>
 
56
    </div></div></div><div class="clear"><hr></hr></div><div id="footer"><div class="xright">� 2001-2007, Apache Software Foundation</div><div class="clear"><hr></hr></div></div></body></html>