Patrick PREMARTIN 69 Posted August 14, 2023 1 hour ago, mvanrijnen said: Why could a POST not be a port of a REST API interface? A REST API has rules : using http commands with parameters to access data as a list or a record and allowing CRUD features if needed. A POST is by convention something with parameters send like a browser does : url encoded in the body, not as a textual body content. They do what they want, it's not the problem, but using REST API as a description of what they do is not true, because we expect standard behavior instead of something that doesn't respect the habits of this type of interface. It's an API, a web API, but not a REST API. Share this post Link to post
mvanrijnen 123 Posted August 14, 2023 1 hour ago, Patrick PREMARTIN said: A POST is by convention something with parameters send like a browser does : url encoded in the body, not as a textual body content. As far as i know it's widely accepted to put the data in a put/post request as json in the body. Share this post Link to post
Uwe Raabe 2057 Posted August 14, 2023 @Patrick PREMARTIN I have never seen some documentation about a REST API to forbit or even avoid POST requests. If you have a link to such docs I would be interested. In my (surely limited) experience with REST API implementations that are not simply read-only, I never encountered anything restricted to GET requests. Share this post Link to post
David Schwartz 426 Posted August 15, 2023 (edited) In my limited experience with APIs and REST interfaces, it seems the API says whether it's a GET, POST, or some other HTTP request type, regardless if it follows typical REST protocols. Recently I had an encounter with a REST interface that's not just a POST request (due to the size of the payload) but it also allows optional querystring parameters on the URL. It sends data back in a RESTResponse packet. It took me quite a while to figure this out since it's not even clearly documented. Whaddaydo? Edited August 15, 2023 by David Schwartz Share this post Link to post