Android loopj http request, cookie question!

Asked 2 years ago, Updated 2 years ago, 134 views

Hello. I have a question regarding Android loopj communication...

Server git.. https://github.com/aj1155/Coop-Project/blob/master/src/main/java/Coop/controller/UserController.java

I'd like to send a request from mobileUserInfo.do here.

All other requests on the server are well used.

Previously, cookies did not fit on proList.do, so they did not go into onSuccess or onFailure inside loopj's client.get, but only went to onFinish. So I created BasicClientCookie, saved the cookie information, created PersistentCookieStore, and added the cookie information above When you specified cookies in client.setCookieStore, I checked that the proList works well...

Other server requests work well, but about half of the requests have a phenomenon where only a few urls go straight into onFinish, like when there were no cookies before... The image above is in the cookie state where all urls are normally used on the web,

[[version: 0][name: JSESSIONID][value: DA673FF0DACF6ABB941D8426F893E506][domain: 52.43.199.148][path: /Coop][expiry: Fri Sep 23 18:04:22 GMT+09:00 2016]]

This is a cookie stored in my cookie store. The difference is that the Expires/Max-Age part has Session and I don't think I have that. Is that a problem?

Android git... https://github.com/chucky6413/Coop-Android/tree/master/app/src/main/java/com/ljw/coop

This is my Android git. I couldn't find out where the problem was for a week, so I'm asking you this question.

I would appreciate it if you could find the communication problem.

android loopj http cookie

2022-09-22 20:24

1 Answers

When this happens, you need to check the server log for two things:

If no. 1 and 2 operate normally, you may suspect that it is a bug in loopj's async-http. If you look at the issue posted on Github, there was actually a phenomenon, and although it was handled in version 1.4.4, there is a comment that the phenomenon occurs after that.

If you think it's a library bug, consider replacing it with a highly-used HTTP library that has been validated for reliability.


2022-09-22 20:24

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.