Just ran into this problem. You also get this fraudulent error if you use an outgoing proxy server and have not configured the HTTPBuilder class to use it explicitly.
You need to set setProxy () method for HTTPBuilder. For some reason, OPTS JVMs such as -Dhttp.proxyHost do not seem to comply with HTTPBuilder. My version looks something like this:
import groovyx.net.http.HTTPBuilder
import static groovyx.net.http.Method.HEAD
def http = new HTTPBuilder( 'https://www.dev.java.net/' )
http.setProxy("my.proxy.com", 8080, "http")
http.ignoreSSLIssues()
def status = http.request( HEAD ) {
response.success = { it.status }
}
source
share