Sending big data to the server

Is it possible to send a large amount of data (for example, the contents of the grid) in $.ajax to the controller? Are there URI Too Long workarounds? I know this is probably not the best practice, instead I should probably send each line one by one, but is this still possible?

0
source share
1 answer

Are there any URI Too Long workarounds?

Use the POST HTTP address instead of GET:

 $.ajax({ url: '/foo', type: 'POST', data: { value: someVariableThatCouldBeHuge }, success: function(result) { // TODO: process the results } }); 

or equivalent:

 $.post('/foo', { value: someVariableThatCouldBeHuge }, function(result) { // TODO: process the results }); 
+2
source

All Articles