| 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>HttpClient</h1> |
| 9 | The <httpClient> type allows the caller to create an HttpClient |
| 10 | instance, and add it as a reference, or be nested as a subelement of |
| 11 | an HTTP method call. |
| 12 | |
| 13 | <h2>Parameters</h2> |
| 14 | <table border="1" cellpadding="2" cellspacing="0"> |
| 15 | <tr> |
| 16 | <th>Attribute</th> |
| 17 | <th>Description</th> |
| 18 | <th>Required</th> |
| 19 | </tr> |
| 20 | <tr> |
| 21 | <td valign="top"><i>id</i></td> |
| 22 | <td valign="top">The reference id to store this HttpClient under.</td> |
| 23 | <td align="center" valign="top">No.</td> |
| 24 | </tr> |
| 25 | <tr> |
| 26 | <td valign="top"><i>refId</i></td> |
| 27 | <td valign="top">The reference id of the HttpClient this element refers to.</td> |
| 28 | <td align="center" valign="top">No.</td> |
| 29 | </tr> |
| 30 | <tr> |
| 31 | <td valign="top"><i>stateRefId</i></td> |
| 32 | <td valign="top">The HttpState object to use.</td> |
| 33 | <td align="center" valign="top">No. Uses a default HttpState.</td> |
| 34 | </tr> |
| 35 | </table> |
| 36 | |
| 37 | <h2>Parameters specified as Nested Elements</h2> |
| 38 | |
| 39 | <br /> |
| 40 | <br /> |
| 41 | <b><clientParams></b><br /> |
| 42 | <p> |
| 43 | Create http client params. |
| 44 | </p> |
| 45 | <table border="1" cellpadding="2" cellspacing="0"> |
| 46 | <tr> |
| 47 | <th>Attribute</th> |
| 48 | <th>Description</th> |
| 49 | <th>Required</th> |
| 50 | </tr> |
| 51 | <tr> |
| 52 | <td valign="top"><i>strict</i></td> |
| 53 | <td valign="top">Should we be strict on the protocol.</td> |
| 54 | <td align="center" valign="top">No.</td> |
| 55 | </tr> |
| 56 | <tr> |
| 57 | <td valign="top"><i>authenticationPreemptive</i></td> |
| 58 | <td valign="top">Should we pre-emptively try to authenticate?</td> |
| 59 | <td align="center" valign="top">No.</td> |
| 60 | </tr> |
| 61 | <tr> |
| 62 | <td valign="top"><i>connectionManagerTimeout</i></td> |
| 63 | <td valign="top">The timeout for the connection manager.</td> |
| 64 | <td align="center" valign="top">No.</td> |
| 65 | </tr> |
| 66 | <tr> |
| 67 | <td valign="top"><i>contentCharSet</i></td> |
| 68 | <td valign="top">The content character set</td> |
| 69 | <td align="center" valign="top">No.</td> |
| 70 | </tr> |
| 71 | <tr> |
| 72 | <td valign="top"><i>cookiePolicy</i></td> |
| 73 | <td valign="top">The cookie policy (IGNORE_COOKIES, RFC_2109, NETSCAPE or DEFAULT)</td> |
| 74 | <td align="center" valign="top">No.</td> |
| 75 | </tr> |
| 76 | <tr> |
| 77 | <td valign="top"><i>credentialCharSet</i></td> |
| 78 | <td valign="top"></td> |
| 79 | <td align="center" valign="top">No.</td> |
| 80 | </tr> |
| 81 | <tr> |
| 82 | <td valign="top"><i>httpElementCharSet</i></td> |
| 83 | <td valign="top"></td> |
| 84 | <td align="center" valign="top">No.</td> |
| 85 | </tr> |
| 86 | <tr> |
| 87 | <td valign="top"><i>soTimeout</i></td> |
| 88 | <td valign="top"></td> |
| 89 | <td align="center" valign="top">No.</td> |
| 90 | </tr> |
| 91 | <tr> |
| 92 | <td valign="top"><i>version</i></td> |
| 93 | <td valign="top">The HTTP version.</td> |
| 94 | <td align="center" valign="top">No.</td> |
| 95 | </tr> |
| 96 | </table> |
| 97 | |
| 98 | Additional <b><clientParams></b> subelements:<br /> |
| 99 | <double>,<int>,<long>,<boolean> |
| 100 | ,<string> <br /> |
| 101 | <p> |
| 102 | Create a client parameter. |
| 103 | </p> |
| 104 | <table border="1" cellpadding="2" cellspacing="0"> |
| 105 | <tr> |
| 106 | <th>Attribute</th> |
| 107 | <th>Description</th> |
| 108 | <th>Required</th> |
| 109 | </tr> |
| 110 | <tr> |
| 111 | <td valign="top"><i>name</i></td> |
| 112 | <td valign="top">The parameter name</td> |
| 113 | <td align="center" valign="top">Yes.</td> |
| 114 | </tr> |
| 115 | <tr> |
| 116 | <td valign="top"><i>value</i></td> |
| 117 | <td valign="top">The parameter value.</td> |
| 118 | <td align="center" valign="top">Yes.</td> |
| 119 | </tr> |
| 120 | </table> |
| 121 | |
| 122 | <br /> |
| 123 | <br /> |
| 124 | <b><hostConfig></b><br /> |
| 125 | <p> |
| 126 | Create a host configuration. |
| 127 | </p> |
| 128 | |
| 129 | <table border="1" cellpadding="2" cellspacing="0"> |
| 130 | <tr> |
| 131 | <th>Attribute</th> |
| 132 | <th>Description</th> |
| 133 | <th>Required</th> |
| 134 | </tr> |
| 135 | <tr> |
| 136 | <td valign="top"><i>host</i></td> |
| 137 | <td valign="top">The host to connect to.</td> |
| 138 | <td align="center" valign="top">No.</td> |
| 139 | </tr> |
| 140 | <tr> |
| 141 | <td valign="top"><i>port</i></td> |
| 142 | <td valign="top"></td> |
| 143 | <td align="center" valign="top">No.</td> |
| 144 | </tr> |
| 145 | <tr> |
| 146 | <td valign="top"><i>protocol</i></td> |
| 147 | <td valign="top"></td> |
| 148 | <td align="center" valign="top">No.</td> |
| 149 | </tr> |
| 150 | <tr> |
| 151 | <td valign="top"><i>address</i></td> |
| 152 | <td valign="top"></td> |
| 153 | <td align="center" valign="top">No.</td> |
| 154 | </tr> |
| 155 | <tr> |
| 156 | <td valign="top"><i>proxyHost</i></td> |
| 157 | <td valign="top">The proxyHost to connect to.</td> |
| 158 | <td align="center" valign="top">No.</td> |
| 159 | </tr> |
| 160 | <tr> |
| 161 | <td valign="top"><i>proxyPort</i></td> |
| 162 | <td valign="top"></td> |
| 163 | <td align="center" valign="top">No.</td> |
| 164 | </tr> |
| 165 | </table> |
| 166 | <br /> |
| 167 | <br /> |
| 168 | Additional <b><hostConfig></b> subelements:<br /> |
| 169 | <hostParams><br /> |
| 170 | <p> |
| 171 | Specify HostParams. |
| 172 | </p> |
| 173 | <table border="1" cellpadding="2" cellspacing="0"> |
| 174 | <tr> |
| 175 | <th><hostParams> subelements are identical to those of |
| 176 | <clientParams></th> |
| 177 | </tr> |
| 178 | </table> |
| 179 | |
| 180 | <br /> |
| 181 | <br /> |
| 182 | <b><httpState></b> <br /> |
| 183 | <p> |
| 184 | Create (or reference an existing) HttpState |
| 185 | for use with this HTTP client. This is necessary if you wish |
| 186 | to enable authentication, or retain state across multiple method calls. |
| 187 | </p> |
| 188 | <table border="1" cellpadding="2" cellspacing="0"> |
| 189 | <tr> |
| 190 | <th>Please see the <a href="http-state_type.html">httpState</a> |
| 191 | documentation for more details on this element</th> |
| 192 | </tr> |
| 193 | </table> |
| 194 | |
| 195 | <h2>Examples</h2> |
| 196 | |
| 197 | <pre> |
| 198 | <code> |
| 199 | <httpClient id="client1"> |
| 200 | <clientParams cookiePolicy="RFC_2109" /> |
| 201 | </httpClient> |
| 202 | </code> |
| 203 | </pre> |
| 204 | |
| 205 | <hr> |
| 206 | <p align="center">Copyright © 2002-2003 Ant-Contrib Project. All |
| 207 | rights Reserved.</p> |
| 208 | |
| 209 | </body> |
| 210 | </html> |