0

I can request to my API by this python code snippet (use requests python):

session = requests.session()
r=session.post(url,data=post_data, auth=(username , passwd))

Server will use this session and redirect my request to another get request then return the json response successfully.

I want to implement this api request on Android using Volley library. I have figured all day, and there is no luck. I can request an GET api successfully, but POST.

I have tried all answer on this question on SO

It seem I cannot create a session for Volley can use it.

Does anyone have experience in using session/cookie for Volley library?

Community
  • 1
  • 1
t4nhpt
  • 5,264
  • 4
  • 34
  • 43
  • It might be treated as an offtop, but why don't you try to do this with Picasso lib? (http://square.github.io/picasso/) Very customisable, well-known library and have a vibrant community around it. Just a thought. – Konstantin Loginov Dec 06 '15 at 20:32
  • @KonstantinLoginov As I know, Picasso is a library supports for download and display image. What I want now is download data from API. – t4nhpt Dec 07 '15 at 00:05

0 Answers0