Maintain session when calling a REST service from Java -


i trying call web services requires authorization(login) user. possible maintain session can call web services in java console base application.

for example:- have 1 rest api in can investor's investment passing investor id. investment details particular investor user has login(that web service(i have create api login calling authorize user)). can pass header along request if can't maintain session that?

please tell me. if not clear please comment below. thank you.

since it's vague problem, try give pointers 'generic' solution. rest service can return object linked credentials of user. it's what's called 'cookie'. then, @ each call, have resend cookie, , have credentials...

see: http://docs.oracle.com/javaee/7/api/javax/servlet/http/cookie.html http://www.java2s.com/tutorial/java/0400__servlet/getsetcookie.htm


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -