Created
August 11, 2017 10:09
-
-
Save scukonick/246f45b0f85e10ba092ff8a8fcf919b6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func handlerabc(w http.ResponseWriter, r *http.Request) { | |
bodyBuffer, err := ioutil.ReadAll(r.Body) | |
if err != nil { | |
log.Errorf("Error reading: %v", err) | |
w.WriteHeader(500) | |
return | |
} | |
defer r.Body.Close() | |
w.WriteHeader(200) | |
w.Header().Set("Server", "A Go Web Server") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment