News for hackers. Stuff that matters.
Re:I've been abusing HTTP Status Codes in my APIs for years by gnutrino on Wednesday July 13, 2022 @05:34PM (#32089028)
Not true.
Re:I've been abusing HTTP Status Codes in my APIs for years by rglullis on Wednesday July 13, 2022 @06:33PM (#32089566)
The "doing REST wrong" was in quotes to express that the practice might be widely accepted but it is not exactly kosher.

In "true" REST, if you have a "search" endpoint, POSTing to it should create to a resource, which could be a reference to the list of results. The created resource should have its own endpoint (something like `/search/results/:query_id`), and the client could then cache it.

If you don't want to do that, but still want to say you are really following REST, you could have an endpoint to represent your resources (`/products`) and use GET with filter parameters in the query string (`/products?search=my+search+term`)