0

I need to implement http method handler with name

getSomeData

According the name I should use GET http methtod.

but this method accepts very big object as input argument and I suppose it might exceed http GET length limi

In raw http I would use body for get request but I can't do it in spring because @RequestBody annotation works only for POST method according java doc(I suppose I works for put, too)

Should I use POST instead of GET in my case ?

gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
  • Yes you'd better switch to POST, Elasticsearch for example allows POST methods for its "get" queries, because it usually also needs the JSON query inside the request body (JSON which may be quite big). – Arnaud Aug 28 '18 at 15:03

1 Answers1

0

Yes you can use POST. Sometimes, its okay to deviate from conventions. Important thing is that functionality should work as expected and there should be no intermittent issues. Sometimes, They are really hard to reproduce.

Rinkal Rohara
  • 232
  • 1
  • 7