Skip to content
This repository has been archived by the owner on Mar 16, 2019. It is now read-only.

Add header tests, set headers correctly #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

robintemme
Copy link
Collaborator

Sorry I didn't really get what you meant with your first comment in #4, but I fixed it now 😁

Also set headers correctly, completely fixing bahlo#4. 🐛
@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 85.211% when pulling 5ce3608 on zwerch:header-tests into 4de7245 on bahlo:master.

@@ -7,6 +7,7 @@ import (

// WriteError writes a string as JSON encoded error
func WriteError(w http.ResponseWriter, code int, err string) {
Copy link
Owner

Choose a reason for hiding this comment

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

Would you mind returning the response of WriteJSON? This would be consistent with WriteJSONWithStatus.

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

Successfully merging this pull request may close these issues.

3 participants