Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add json content handler for /forks #136

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

0xTylerHolmes
Copy link

I've been using Dora for some testing and really like exposing the /forks page to allow dumping the forks as JSON. I would be eager to have this merged. Do you have any recommendations?

@@ -31,6 +33,21 @@ func Forks(w http.ResponseWriter, r *http.Request) {
handlePageError(w, r, pageError)
return
}

if r.Header.Get("Content-Type") == "application/json" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should check for the Accept header here.
Content-Type in requests describes the type of the data being delivered with the request.
Its used for POST/PUT/PATCH requests only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants