mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-08 16:49:02 +03:00
[GH-ISSUE #618] JSON "Accept" Headers #370
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @troygibb on GitHub (Aug 19, 2025).
Original GitHub issue: https://github.com/sigoden/dufs/issues/618
Specific Demand
Thanks so much for the great project! Love that getting it up and going is so easy. So far very happy with it.
One thing that seems a bit non-conventional is your use of a
?jsonquery param. It would be more idiomatic to read the request's "Accept" header here and see if the request would acceptapplication/json. Otherwise send back thml.I double checked previous issues for this question/request here, and didn't see this come up before.
Implement Suggestion
See above!
@sigoden commented on GitHub (Aug 19, 2025):
There is a standard, but I've never seen any API designed like that. The
?jsonapproach is still more common.@troygibb commented on GitHub (Aug 19, 2025):
For sure! In my experience mostly on the web side, it's pretty standard for servers to respect the Accept headers. No worries either way here was just pointing out a potential usability improvement 😄