0

I'm trying to pass formdata through RestTemplate with different datatypes.

MultiValueMap<String, String> map = new MultiValueMap<String, String>();
map..set("app_id", 12);
map..set("app_name", "Partner");

But the api I'm hitting throwing Bad request, I tried from postman same request works fine.

Is there any other way I can pass multidatatype request in restemplate formdata?

Dale K
  • 25,246
  • 15
  • 42
  • 71
Sreedhu Madhu
  • 2,480
  • 2
  • 30
  • 40

1 Answers1

2

You can use Object in this case :

MultiValueMap<String, Object> map = new MultiValueMap<>();
Youcef LAIDANI
  • 55,661
  • 15
  • 90
  • 140