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>*Method</h1> |
||
9 | The <method> tasks allows the caller to use the various |
||
10 | HTTP methods (current GET, HEAD and POST are supported). These |
||
11 | methods have some common attributes, and sub-elements which are |
||
12 | are as shown below: |
||
13 | |||
14 | |||
15 | <h2>Parameters</h2> |
||
16 | <table border="1" cellpadding="2" cellspacing="0"> |
||
17 | <tr> |
||
18 | <th>Attribute</th> |
||
19 | <th>Description</th> |
||
20 | <th>Required</th> |
||
21 | </tr> |
||
22 | <tr> |
||
23 | <td valign="top"><i>url</i></td> |
||
24 | <td valign="top">The url that is being called.</td> |
||
25 | <td align="center" valign="top">No, if the client host configuration is |
||
26 | defined, and the path attribute is specified.</td> |
||
27 | </tr> |
||
28 | <tr> |
||
29 | <td valign="top"><i>path</i></td> |
||
30 | <td valign="top">The path which we are going to connect to. If this is used, |
||
31 | you must declare an httpClient subelement, or set the clientRefId attribute |
||
32 | for an HttpClient instance with configured host parameters.</td> |
||
33 | <td align="center" valign="top">No.</td> |
||
34 | </tr> |
||
35 | <tr> |
||
36 | <td valign="top"><i>queryString</i></td> |
||
37 | <td valign="top">The queryString which we are posting to. If this is used, |
||
38 | you must declare an httpClient subelement, or set the clientRefId attribute |
||
39 | for an HttpClient instance with configured host parameters.</td> |
||
40 | <td align="center" valign="top">No.</td> |
||
41 | </tr> |
||
42 | <tr> |
||
43 | <td valign="top"><i>clientRefId</i></td> |
||
44 | <td valign="top">The reference id of a previously declared |
||
45 | <httpClient> data type instance. This is necessary |
||
46 | if you want to retain state (cookies) across multiple requests, |
||
47 | or you want specific client configuration and host configuration |
||
48 | parameters. If not specified, we create a new <httpClient> |
||
49 | with the default settings.</td> |
||
50 | <td align="center" valign="top">No.</td> |
||
51 | </tr> |
||
52 | <tr> |
||
53 | <td valign="top"><i>responseDataFile</td> |
||
54 | <td valign="top">The path of the file where the response data will be placed.</td> |
||
55 | <td align="center" valign="top">No.</td> |
||
56 | </tr> |
||
57 | <tr> |
||
58 | <td valign="top"><i>responseDataProperty</td> |
||
59 | <td valign="top">The property where the response data will be placed.</td> |
||
60 | <td align="center" valign="top">No.</td> |
||
61 | </tr> |
||
62 | <tr> |
||
63 | <td valign="top"><i>statusCodeProperty</i></td> |
||
64 | <td valign="top">The name of the property to set with the HTTP response status code.</td> |
||
65 | <td align="center" valign="top">No.</td> |
||
66 | </tr> |
||
67 | <tr> |
||
68 | <td valign="top"><i>doAuthentication</i></td> |
||
69 | <td valign="top">Should we perform authentication.</td> |
||
70 | <td align="center" valign="top">No. If set, you must |
||
71 | either declare an <httpClient> instance, or set the |
||
72 | clientRefId attribute for an HttpClient which has credentials |
||
73 | installed into it.</td> |
||
74 | </tr> |
||
75 | <tr> |
||
76 | <td valign="top"><i>followRedirects</i></td> |
||
77 | <td valign="top">Should we automatically follow redirects.</td> |
||
78 | <td align="center" valign="top">No.</td> |
||
79 | </tr> |
||
80 | </table> |
||
81 | |||
82 | <h2>Parameters specified as Nested Elements</h2> |
||
83 | |||
84 | <br /> |
||
85 | <br /> |
||
86 | |||
87 | <b><httpClient></b> <br /> |
||
88 | <p> |
||
89 | Create (or reference an existing) HttpClient |
||
90 | for use with this HTTP method call. This is necessary if you wish |
||
91 | to configure the client beyond the default settings, enable |
||
92 | authentication, or retain state across multiple method calls. |
||
93 | </p> |
||
94 | <table border="1" cellpadding="2" cellspacing="0"> |
||
95 | <tr> |
||
96 | <th>Please see the <a href="http-client_type.html">httpClient</a> |
||
97 | documentation for more details on this element</th> |
||
98 | </tr> |
||
99 | </table> |
||
100 | |||
101 | <br /> |
||
102 | <br /> |
||
103 | <b><header></b><br /> |
||
104 | <p> |
||
105 | Create a request header to be sent. |
||
106 | </p> |
||
107 | <table border="1" cellpadding="2" cellspacing="0"> |
||
108 | <tr> |
||
109 | <th>Attribute</th> |
||
110 | <th>Description</th> |
||
111 | <th>Required</th> |
||
112 | </tr> |
||
113 | <tr> |
||
114 | <td valign="top"><i>name</i></td> |
||
115 | <td valign="top">The header name.</td> |
||
116 | <td align="center" valign="top">Yes.</td> |
||
117 | </tr> |
||
118 | <tr> |
||
119 | <td valign="top"><i>value</i></td> |
||
120 | <td valign="top">The header value.</td> |
||
121 | <td align="center" valign="top">Yes.</td> |
||
122 | </tr> |
||
123 | </table> |
||
124 | |||
125 | <br /> |
||
126 | <br /> |
||
127 | <b><responseHeader></b><br /> |
||
128 | <p> |
||
129 | Specify a response header to be retrieved into a property. |
||
130 | </p> |
||
131 | <table border="1" cellpadding="2" cellspacing="0"> |
||
132 | <tr> |
||
133 | <th>Attribute</th> |
||
134 | <th>Description</th> |
||
135 | <th>Required</th> |
||
136 | </tr> |
||
137 | <tr> |
||
138 | <td valign="top"><i>name</i></td> |
||
139 | <td valign="top">The header name.</td> |
||
140 | <td align="center" valign="top">Yes.</td> |
||
141 | </tr> |
||
142 | <tr> |
||
143 | <td valign="top"><i>property</i></td> |
||
144 | <td valign="top">The property to be set with the header value.</td> |
||
145 | <td align="center" valign="top">Yes.</td> |
||
146 | </tr> |
||
147 | </table> |
||
148 | |||
149 | <br /> |
||
150 | <br /> |
||
151 | <b><params></b><br /> |
||
152 | <p> |
||
153 | Create http method paramaters. |
||
154 | </p> |
||
155 | <table border="1" cellpadding="2" cellspacing="0"> |
||
156 | <tr> |
||
157 | <th>Attribute</th> |
||
158 | <th>Description</th> |
||
159 | <th>Required</th> |
||
160 | </tr> |
||
161 | <tr> |
||
162 | <td valign="top"><i>contentCharSet</i></td> |
||
163 | <td valign="top">The content character set</td> |
||
164 | <td align="center" valign="top">No.</td> |
||
165 | </tr> |
||
166 | <tr> |
||
167 | <td valign="top"><i>cookiePolicy</i></td> |
||
168 | <td valign="top">The cookie policy (IGNORE_COOKIES, RFC_2109, NETSCAPE or DEFAULT)</td> |
||
169 | <td align="center" valign="top">No.</td> |
||
170 | </tr> |
||
171 | <tr> |
||
172 | <td valign="top"><i>credentialCharSet</i></td> |
||
173 | <td valign="top"></td> |
||
174 | <td align="center" valign="top">No.</td> |
||
175 | </tr> |
||
176 | <tr> |
||
177 | <td valign="top"><i>httpElementCharSet</i></td> |
||
178 | <td valign="top"></td> |
||
179 | <td align="center" valign="top">No.</td> |
||
180 | </tr> |
||
181 | <tr> |
||
182 | <td valign="top"><i>soTimeout</i></td> |
||
183 | <td valign="top"></td> |
||
184 | <td align="center" valign="top">No.</td> |
||
185 | </tr> |
||
186 | <tr> |
||
187 | <td valign="top"><i>version</i></td> |
||
188 | <td valign="top">The HTTP version.</td> |
||
189 | <td align="center" valign="top">No.</td> |
||
190 | </tr> |
||
191 | </table> |
||
192 | |||
193 | <br /> |
||
194 | <br /> |
||
195 | |||
196 | Additional <b><params></b> subelements:<br /> |
||
197 | <double>,<int>,<long>,<boolean> |
||
198 | ,<string> <br /> |
||
199 | <p> |
||
200 | Create a method parameter. |
||
201 | </p> |
||
202 | |||
203 | <table border="1" cellpadding="2" cellspacing="0"> |
||
204 | <tr> |
||
205 | <th>Attribute</th> |
||
206 | <th>Description</th> |
||
207 | <th>Required</th> |
||
208 | </tr> |
||
209 | <tr> |
||
210 | <td valign="top"><i>name</i></td> |
||
211 | <td valign="top">The parameter name</td> |
||
212 | <td align="center" valign="top">Yes.</td> |
||
213 | </tr> |
||
214 | <tr> |
||
215 | <td valign="top"><i>value</i></td> |
||
216 | <td valign="top">The parameter value.</td> |
||
217 | <td align="center" valign="top">Yes.</td> |
||
218 | </tr> |
||
219 | </table> |
||
220 | |||
221 | |||
222 | <h2>Examples</h2> |
||
223 | |||
224 | |||
225 | <hr> |
||
226 | <p align="center">Copyright © 2002-2003 Ant-Contrib Project. All |
||
227 | rights Reserved.</p> |
||
228 | |||
229 | </body> |
||
230 | </html> |