FrameworkBenchmarks icon indicating copy to clipboard operation
FrameworkBenchmarks copied to clipboard

/updates should be PUT

Open cptwunderlich opened this issue 4 months ago • 2 comments

The "Data updates" benchmark sends a GET request to /updates. However, this changes the DB and should not be a GET - GETs are idempotent.

This might sound like nit-picking, but I was trying to fix the benchmarks for the postgREST project, but I can't get the update benchmark to work. That's because postgREST generates a REST API out of your database and it enforces transaction access mode according to the HTTP method. I.e., it will start a READ_ONLY transaction for GET requests.

Any chance this could be configurable, as not to break existing implementations, but use PUT for new ones?

cptwunderlich avatar Aug 21 '25 15:08 cptwunderlich

Isn't POST for create and PUT/PATCH for update?

marius-ciclistu avatar Nov 23 '25 10:11 marius-ciclistu

You're right, idk why I wrote POST 🤦🏻‍♂️ Fixed it.

cptwunderlich avatar Nov 25 '25 10:11 cptwunderlich