View Single Post
  #2 (permalink)  
Old 02-04-2008, 04:35 AM
wolfroma wolfroma is offline
Project Contributor
 
Posts: 106
Default

I find what I have to upload image to /service/upload servlet, I write simple code like httpclient example. But I can't set cookie for autorization token.
My code:
HttpClient client = new HttpClient();
client.getHttpConnectionManager().
getParams().setConnectionTimeout(8000);
HttpState initialState = new HttpState();
Cookie mycookie = new Cookie("."+endpoint.getAuthority(), "ZM_AUTH_TOKEN", ccontext.getAuthToken(), "/", null, false);
initialState.addCookie(mycookie);
client.setState(initialState);
Help me please
Reply With Quote