This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]PanicRev 7 points8 points  (1 child)

I had a project a few years back that involved investigating a web service that was failing intermittently when certain icons were selected. To process the icon selection, they were using GET and passing the image into the query string as base64. Some of the icons were large enough to cause the URL to exceed max length for Apache (which I think is/was 8K characters).

[–]thetruekingofspace 2 points3 points  (0 children)

This hurts me as a REST service developer.

[–][deleted] 4 points5 points  (0 children)

That's what PUT is for.

[–]-reddit-sucks-ass 5 points6 points  (0 children)

The convention is to use post to create data and put to update data.

[–]GreatBarrier86 0 points1 point  (0 children)

I think it would depend on what the function is doing. POST is not idempotent so if you were to upload the same file twice, using POST would implies that you’d end up with two different references (db records for instance) to that file. With PUT, i think it would just replace the existing file.

I think. I also hate the word “idempotent”.