Specifies whether to autodetect proxy settings. @param autodetect set to true to use proxy auto detection, false to leave proxy settings unspecified @return reference to self
(boolean autodetect)
| 199 | * @return reference to self |
| 200 | */ |
| 201 | public Proxy setAutodetect(boolean autodetect) { |
| 202 | if (this.autodetect == autodetect) { |
| 203 | return this; |
| 204 | } |
| 205 | if (autodetect) { |
| 206 | verifyProxyTypeCompatibility(ProxyType.AUTODETECT); |
| 207 | this.proxyType = ProxyType.AUTODETECT; |
| 208 | } else { |
| 209 | this.proxyType = ProxyType.UNSPECIFIED; |
| 210 | } |
| 211 | this.autodetect = autodetect; |
| 212 | return this; |
| 213 | } |
| 214 | |
| 215 | /** |
| 216 | * Gets the HTTP proxy. |