Jump to content
Ian Branch

Some REST help please.

Recommended Posts

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
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

@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

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 by David Schwartz

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×