diff options
| author | Shulhan <m.shulhan@gmail.com> | 2019-09-20 10:10:46 +0700 |
|---|---|---|
| committer | Shulhan <m.shulhan@gmail.com> | 2019-09-23 23:47:48 +0700 |
| commit | b94d65f550dc3e95839579d42b968685d4ee890f (patch) | |
| tree | 6ff356fc45d86a853195fdd334a5ba1b1d8f25b8 | |
| parent | 7599e469bd4bf2c8508ce4f4a4c27356706378b6 (diff) | |
| download | pakakeh.go-b94d65f550dc3e95839579d42b968685d4ee890f.tar.xz | |
http: add content and response type HTML and XML
| -rw-r--r-- | lib/http/http.go | 2 | ||||
| -rw-r--r-- | lib/http/responsetype.go | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/http/http.go b/lib/http/http.go index a87bed02..307505e4 100644 --- a/lib/http/http.go +++ b/lib/http/http.go @@ -136,8 +136,10 @@ const ( ContentType = "Content-Type" ContentTypeBinary = "application/octet-stream" ContentTypeForm = "application/x-www-form-urlencoded" + ContentTypeHTML = "text/html; charset=utf-8" ContentTypeJSON = "application/json" ContentTypePlain = "text/plain; charset=utf-8" + ContentTypeXML = "text/xml; charset=utf-8" HeaderLocation = "Location" ) diff --git a/lib/http/responsetype.go b/lib/http/responsetype.go index c93941d8..1dd38a0f 100644 --- a/lib/http/responsetype.go +++ b/lib/http/responsetype.go @@ -11,6 +11,8 @@ type ResponseType int const ( ResponseTypeNone ResponseType = 0 ResponseTypeBinary = 1 << iota - ResponseTypePlain + ResponseTypeHTML ResponseTypeJSON + ResponseTypePlain + ResponseTypeXML ) |
