Spring Android - Post Request - Url Encoded Params From Class Object
I am trying to send some key-value pairs in Android Spring POST Request.It works correctly , if I am using a MultiValueMap map= new LinkedMultiValueMap
Solution 1:
When posting a media type of APPLICATION_FORM_URLENCODED
with FormHttpMessageConverter
, you must use a MultiValueMap
, as seen here. Alternatively, if you want to post JSON, Jackson is used internally to convert any object class to JSON output. Spring uses message converters to determine how to read/write objects, and which types are compatible with which media types.
Post a Comment for "Spring Android - Post Request - Url Encoded Params From Class Object"