Hi, I'm trying to use the postmethod to conect a https site, but i need
to conect the proxy first.
So I put the host, port, login and pass to connect and I see that
everything is ok. When i try
to connect the https site, the error comes: Connection is not Open!
But, if i try to connect any http site, it doesn't comes with error.
I'm trying this at the company that I work. When I test it at home, I
can connect to the
https site without any error. I think that is happening because there's
something wrong
with the proxy.
I'm gonna paste some part of the code:
...
HttpClient client = new HttpClient();
client.getHostConfiguration().setProxy("proxy", port);
client.getState().setProxyCredentials(AuthScope.ANY,
new UsernamePasswordCredentials("user", "pass"));
PostMethod method = new PostMethod(url);
method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER,
new DefaultHttpMethodRetryHandler(3, false));
method.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);
method.addParameter("user","user");
method.addParameter("pass","pass");
try {
int status = client.executeMethod(method);
...
I can't understand what's wrong here.
I get the error when he try to execute the method post. The last line i
paste here.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]