Skip to content

Merge PUT handler into POST #162

@mtlynch

Description

@mtlynch

The PUT handler doesn't match the semantics of the traditional PUT verb.

I chose PUT because I wanted a way for the client to signal to the server that it wanted back the URL instead of a JSON object.

Revisiting the decision, I should have just used an Accept header in the request to let the client specify whether they want plaintext (default) or JSON. So we should combine the handlers for PUT and POST into a single handler that chooses output based on the content type and accept headers.

See similar work in PicoShare: https://github.com/mtlynch/picoshare/pull/318/files

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions