0

What's the best way to send multiple parameters on a REST GET resource call. Normally we can call GET call with path param &/ query however the number of character is limited on a URL so any suggestion or best practice on how to achieve this.

This can be achieved via POST where sending the query in request body as JSON and use json converter on the resource end. I am thinking POST mayn't be a right approach for query or get service from a resource. I search the existing questions on this but didn't get any proper answer.

Thanks in advance.

Sujit
  • 468
  • 1
  • 8
  • 22

1 Answers1

0

You can send a limited data with GET and even the data is visible in URL making data vurnerable. When you use POST data is a alot more safer than GET and you can send large no. of request parameters. You can checkout this link

Neha
  • 76
  • 11
  • Actually I was able to achieve with POST but as per REST principle the use of GET is for querying/fetching content from resource where as POST, which is meant for resource creation. So I was thinking what's the best way to follow or this scenario can only be handled via POST data. – Sujit Mar 04 '17 at 03:57
  • I think POST is more safer for webservice calling as when we use GET request parameters are visible in the URL so if any body has that can easily used. – Neha Mar 04 '17 at 04:01