forked from mirrors/homebox
refactor server to support variable options
This commit is contained in:
parent
245591cb23
commit
1143246816
6 changed files with 89 additions and 21 deletions
|
@ -21,7 +21,7 @@ func Respond(w http.ResponseWriter, statusCode int, data interface{}) {
|
|||
}
|
||||
|
||||
// Set the content type and headers once we know marshaling has succeeded.
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
w.Header().Set("Content-Type", ContentJSON)
|
||||
|
||||
// Write the status code to the response.
|
||||
w.WriteHeader(statusCode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue