We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Rest API payload

Hi, I am wondering if I should pass my values in URL or in body as JSON object. Which option is better?



6.9k
Accepted
answer

Your question is unclear. Are you concerned about convenience or security?

If its convenience, it doens't matter either way. Usually its easier to shape a request body.

If its for security, it doesn't matter too much. The body of the network call is just as easy to read as the URL. If you are concerned about security it is imperative that you use SSL.

https://stackoverflow.com/questions/198462/is-either-get-or-post-more-secure-than-the-other