Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to send a HashMap from Android app to Servlet request

 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there

I am trying to send a HashMap from android app to Server in Post Request
this is my code



But My Question is How to send HashMap using Name parameters?

I have not write any Code yet But I am expecting something like

HashMap map=new HashMap();

//all Values in map are added in above.

Map<String, String> maptest=new HashMap<String, String>();
maptest.put("name", "kishor");
maptest.put("roolno", "1000");
....

and these values is added in parameters.

Any Help
Thanks
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HTTP has no notion of maps, so you need to add all pairs individually, like in the code you showed.
 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic