Pass the multiple JSON object request to API using StringRequest property of Volley library

Issue

i need to pass the multiple JSON object fields in single request to StringRequest property of Volley library.I mentioned the request body below for better understanding.

{
"DeviceInfo": {
    "Os": "Android",
    "Access": "true"
  },
  "FirstName": "test",
  "LastName": "test",
  "USerName": "test"
}

This has to be passed to StringRequest method and the response has to be fetched.Please help me to fix this, thanks!

Solution

atlast i found the answer am just change the content type format in header like x-www-form-urlencoded format instead of json and the response is fetched successfully thanks for the guys who post their solutions.

Answered By – karuppiah

Answer Checked By – Marilyn (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *