Ulf Dittmer wrote:If you used HttpClient for all requests, you could turn on its cookie support (which is, I assume, how authentication is controlled after a login).
Apologize i dont quite understand your statement, can you show me where to change. Thanks.
Or you saiding that the http://ipaddress/platform/Login => should be using HttpCLient method follow by a Postmethod ? like what I did for the second API.
Alan So
Greenhorn
Joined: Sep 07, 2011
Posts: 10
posted
0
Rob Spoor wrote:And welcome to the Ranch!
Thanks hopefully I can get all the helps in here.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35223
7
posted
0
ss sk wrote:
Ulf Dittmer wrote:If you used HttpClient for all requests, you could turn on its cookie support (which is, I assume, how authentication is controlled after a login).
Apologize i dont quite understand your statement, can you show me where to change. Thanks.
You're using HttpUrlConnection for the POST method, but HttpCLient for the GET method. If instead you were using HttpClient for both methods, you could use its cookie support for tracking any login cookies that may be set by the login (assuming cookies are used for that, which you need to find out).
Also, you need to change your display name -which is invalid- or your account will be closed soon.
Alan So
Greenhorn
Joined: Sep 07, 2011
Posts: 10
posted
0
Ulf Dittmer wrote:
ss sk wrote:
Ulf Dittmer wrote:If you used HttpClient for all requests, you could turn on its cookie support (which is, I assume, how authentication is controlled after a login).
Apologize i dont quite understand your statement, can you show me where to change. Thanks.
You're using HttpUrlConnection for the POST method, but HttpCLient for the GET method. If instead you were using HttpClient for both methods, you could use its cookie support for tracking any login cookies that may be set by the login (assuming cookies are used for that, which you need to find out).
Also, you need to change your display name -which is invalid- or your account will be closed soon.
O ok. So both should use the HttpClient method instead. Any issues will be back again.
thanks once again.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.