aspose file tools*
The moose likes Spring and the fly likes Using Spring have multiple JSON request (POST) in a single HTTP call Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Using Spring have multiple JSON request (POST) in a single HTTP call" Watch "Using Spring have multiple JSON request (POST) in a single HTTP call" New topic
Author

Using Spring have multiple JSON request (POST) in a single HTTP call

Shankar Goru
Greenhorn

Joined: Apr 15, 2013
Posts: 1
How can I use Spring3 framework when combining 2 different REST (using JSON) requests within a single HTTP call? I am using Spring with jackson for JSON conversion. What is the most optimal way of doing it? I am not sure, if it comes under multi-part request.

For example, if I had the following 2 unrelated JSON payloads that I want to combine in a single HTTP call.

"json1":
{
"Name": "abc",
"Age": "111"
}

"json2":
{
"stockName": "xyz",
"stockSymbol": "SS"
}

Once my main controller method handles the initial call, is it then possible to map different additional controller methods for different JSON payloads? I want to understand what is the optimal way of handling such scenarios?

Thanks for the help.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Using Spring have multiple JSON request (POST) in a single HTTP call