2

I want to pass List of Objects, say Drivers, in HTTP POST Request. While NameValuePair takes only Strings. How I can pass it with HTTP POST Request?

2 Answers 2

0

try

StringEntity ss= new StringEntity(yourObj.toString());
        // Set HTTP parameters
        httpPost.setEntity(se);

I think it will help you.

Sign up to request clarification or add additional context in comments.

Comments

0

i think this post will be helpful to you

Sending a serialized object from Android to a servlet using HTTP client

they suggests to use JSON or XML

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.