Live data from Hacker News

How did REST come to mean the opposite of REST?

htmx.org

391–393 of 393 posts

Re: How did REST come to mean the opposite of REST?

#391
post #331

Earlier quoted context omitted.

You're talking about implementation details on thw server side. Why should the client care about that? Why should the error code for /product/foo/thumbnails/123.jpg be different if served with nginx serving a static file or an application server that dynamically generates it based on the product id?

I make a distinction between the file and the endpoint. While 123.jpg can be found or not the thumbnails/123/ API Endpoint has two parts, the Call and the Argument: 123. To be honest... my argument unraveled in my head while writing - yes you have a point there. So I just can say that 404 is unhelpful because it's unspecific.

I think it's about the route. For a `thumbnails/123/` endpoint, the parameters are specified in the route. You're encoding more information in the HTTP level, so encoding the error in the HTTP level as well is reasonable, you can definitely have a 404 response if there's no 123 image present.

But if the route is ID-agnostic, like `/cgi-bin/generate_thumbnails.pl` or `/api/json_rpc.php` then you could justify a 200 OK that the endpoint itself was found, regardless of the parameters. In this design the RPC is definitely above the HTTP level.

Re: How did REST come to mean the opposite of REST?

#392
post #224
post #155

Earlier quoted context omitted.

You know what else crosses ISO/OSI layer boundaries? Switches. But I don't see anyone saying hubbed networks are better. And realistically how often are you going to change your "transport"? And if you added an abstraction layer would that actually make it any easier? Stuff like SOAP ends up being the inner-platform effect where you reimplement all of HTTP on top of HTTP and actually implementing a new SOAP transport…

> You know what else crosses ISO/OSI layer boundaries? Switches. No, they do not. Switches work at L2 and are only interested in L2 concepts (MAC addresses). They work transparently for any application that is not crossing the L1/L2 boundary. Routers are L3.

they might be talking about switches that also have routers, which is common enough these days to think they are one in the same (they are not, as you noted)

Re: How did REST come to mean the opposite of REST?

#393

Earlier quoted context omitted.

What if a mobile application wants to use the API?

REST systems are designed for use with "generic" clients. The generic client for REST systems on the WWW is a browser. There is probably one available for your mobile platform.

What if a native application (mobile or desktop) wants to consume the API?
Post reply on HN