It's all about the answers!

Ask a question

What is the java code to logout from Jazz server via HTTP request.


Swapnil Sahu (1317) | asked Jun 01 '18, 1:36 a.m.

Hello,

I have log in something like this:

 HttpPost securityCheck = new HttpPost(this.authUrl + "/j_security_check"); 

  StringEntity entity = new StringEntity("j_username=" + this.user + "&j_password=" + this.password); 
  securityCheck.setHeader("Accept""/"); 
  securityCheck.setHeader("X-Requested-With""XMLHttpRequest"); 
  securityCheck.setEntity(entity); 
  securityCheck.addHeader("Content-Type""application/x-www-form-urlencoded; charset=utf-8"); 
  securityCheck.addHeader("OSLC-Core-Version""2.0"); 
 
  resp = httpClient.execute(securityCheck);

Now I have to logout.

Regards,
Swapnil

Be the first one to answer this question!


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.