• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is it common to use Spring @RestController to process Ajax request?  RSS feed

 
Ekaterina Galkina
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you update a web page partially and send a request which format is usually used to communicate with server? JSON? Is it usually a RESTfull call?
 
Stephan van Hulst
Saloon Keeper
Posts: 7722
142
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That would be my preferred way, yes. You can just send a JavaScript object as the request body, and use the response (also in JSON) to update the model at the client side, which will automatically update the UI if you're using a JavaScript framework that supports model-view bindings.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!