Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1777 | jmachado | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
2 | <html> |
||
3 | <head> |
||
4 | <title>Ant-contrib Tasks: Http Tasks</title> |
||
5 | </head> |
||
6 | |||
7 | <body> |
||
8 | <h1>Post-Method</h1> |
||
9 | The <post-method> task allows the caller to use the HTTP POST |
||
10 | method to send data to an arbitrary url. This data can be one of the |
||
11 | following: |
||
12 | <ul> |
||
13 | <li>Name/Value pairs</li> |
||
14 | <li>File content</li> |
||
15 | <li>Text content</li> |
||
16 | <li>Multi-part content</li> |
||
17 | </ul> |
||
18 | This method inherits the <a href="method_task_common.html"> |
||
19 | Common Method</a> attributes and subelements. It also contains |
||
20 | the following additional attributes and subelements: |
||
21 | |||
22 | |||
23 | <h2>Parameters</h2> |
||
24 | <table border="1" cellpadding="2" cellspacing="0"> |
||
25 | <tr> |
||
26 | <th>Attribute</th> |
||
27 | <th>Description</th> |
||
28 | <th>Required</th> |
||
29 | </tr> |
||
30 | <tr> |
||
31 | <td valign="top"><i>multipart</i></td> |
||
32 | <td valign="top">Should multipart content be forced, even if |
||
33 | only a single file or text part is specified.</td> |
||
34 | <td align="center" valign="top">No.</td> |
||
35 | </tr> |
||
36 | <tr> |
||
37 | <td valign="top"><i>parameters</td> |
||
38 | <td valign="top">A java .properties file which contains post parameters.</td> |
||
39 | <td align="center" valign="top">No.</td> |
||
40 | </tr> |
||
41 | </table> |
||
42 | |||
43 | <h2>Parameters specified as Nested Elements</h2> |
||
44 | |||
45 | |||
46 | <br /> |
||
47 | <br /> |
||
48 | <b><parameter></b><br /> |
||
49 | <p> |
||
50 | Create a text post parameter. |
||
51 | </p> |
||
52 | <table border="1" cellpadding="2" cellspacing="0"> |
||
53 | <tr> |
||
54 | <th>Attribute</th> |
||
55 | <th>Description</th> |
||
56 | <th>Required</th> |
||
57 | </tr> |
||
58 | <tr> |
||
59 | <td valign="top"><i>name</i></td> |
||
60 | <td valign="top">The parameter name.</td> |
||
61 | <td align="center" valign="top">Yes.</td> |
||
62 | </tr> |
||
63 | <tr> |
||
64 | <td valign="top"><i>value</i></td> |
||
65 | <td valign="top">The parameter value.</td> |
||
66 | <td align="center" valign="top">Yes.</td> |
||
67 | </tr> |
||
68 | </table> |
||
69 | |||
70 | <br /> |
||
71 | <br /> |
||
72 | <b><file></b><br /> |
||
73 | <p> |
||
74 | Add a File part to the request. |
||
75 | </p> |
||
76 | <table border="1" cellpadding="2" cellspacing="0"> |
||
77 | <tr> |
||
78 | <th>Attribute</th> |
||
79 | <th>Description</th> |
||
80 | <th>Required</th> |
||
81 | </tr> |
||
82 | <tr> |
||
83 | <td valign="top"><i>name</i></td> |
||
84 | <td valign="top">The parameter name.</td> |
||
85 | <td align="center" valign="top">Yes.</td> |
||
86 | </tr> |
||
87 | <tr> |
||
88 | <td valign="top"><i>path</i></td> |
||
89 | <td valign="top">The file path to send.</td> |
||
90 | <td align="center" valign="top">Yes.</td> |
||
91 | </tr> |
||
92 | <tr> |
||
93 | <td valign="top"><i>contentType</i></td> |
||
94 | <td valign="top">The content type of the file.</td> |
||
95 | <td align="center" valign="top">No.</td> |
||
96 | </tr> |
||
97 | <tr> |
||
98 | <td valign="top"><i>charSet</i></td> |
||
99 | <td valign="top">The character set.</td> |
||
100 | <td align="center" valign="top">No.</td> |
||
101 | </tr> |
||
102 | </table> |
||
103 | |||
104 | <br /> |
||
105 | <br /> |
||
106 | <b><text></b><br /> |
||
107 | <p> |
||
108 | Add a Text part to the request. |
||
109 | </p> |
||
110 | <table border="1" cellpadding="2" cellspacing="0"> |
||
111 | <tr> |
||
112 | <th>Attribute</th> |
||
113 | <th>Description</th> |
||
114 | <th>Required</th> |
||
115 | </tr> |
||
116 | <tr> |
||
117 | <td valign="top"><i>name</i></td> |
||
118 | <td valign="top">The parameter name.</td> |
||
119 | <td align="center" valign="top">Yes.</td> |
||
120 | </tr> |
||
121 | <tr> |
||
122 | <td valign="top"><i>value</i></td> |
||
123 | <td valign="top">The string value to send. This may |
||
124 | also be specified as nested text to this element.</td> |
||
125 | <td align="center" valign="top">Yes.</td> |
||
126 | </tr> |
||
127 | <tr> |
||
128 | <td valign="top"><i>contentType</i></td> |
||
129 | <td valign="top">The content type of the file.</td> |
||
130 | <td align="center" valign="top">No.</td> |
||
131 | </tr> |
||
132 | <tr> |
||
133 | <td valign="top"><i>charSet</i></td> |
||
134 | <td valign="top">The character set.</td> |
||
135 | <td align="center" valign="top">No.</td> |
||
136 | </tr> |
||
137 | </table> |
||
138 | |||
139 | |||
140 | <h2>Examples</h2> |
||
141 | |||
142 | |||
143 | <hr> |
||
144 | <p align="center">Copyright © 2002-2003 Ant-Contrib Project. All |
||
145 | rights Reserved.</p> |
||
146 | |||
147 | </body> |
||
148 | </html> |