Core functionality for new aiterp.net servers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
264 B

7 years ago
  1. package response
  2. import (
  3. "net/http"
  4. )
  5. // Text makes a textual response
  6. func Text(writer http.ResponseWriter, status int, data string) {
  7. writer.Header().Set("Content-Type", "text/plain; charset=utf-8")
  8. writer.WriteHeader(status)
  9. writer.Write([]byte(data))
  10. }