2024-01-03 20:39:39 +03:00
|
|
|
package contents
|
|
|
|
|
2024-02-29 23:19:07 +03:00
|
|
|
type Option interface {
|
|
|
|
KeyValue() [2]string
|
|
|
|
}
|
2024-01-03 20:39:39 +03:00
|
|
|
|
2024-01-10 18:23:02 +03:00
|
|
|
type CharSet string
|
|
|
|
const (
|
2024-02-29 23:19:07 +03:00
|
|
|
Utf8 CharSet = "utf-8"
|
2024-01-10 18:23:02 +03:00
|
|
|
)
|
2024-02-29 23:19:07 +03:00
|
|
|
func (cs CharSet) KeyValue() [2]string {
|
|
|
|
return [2]string{
|
|
|
|
"charset",
|
|
|
|
string(cs),
|
|
|
|
}
|
|
|
|
}
|
2024-01-03 20:39:39 +03:00
|
|
|
|
2024-01-10 18:23:02 +03:00
|
|
|
type Type string
|
2024-01-03 20:39:39 +03:00
|
|
|
const (
|
|
|
|
// Using the UTF-8 by default.
|
|
|
|
Unknown Type = "application/octet-stream"
|
2024-01-10 18:23:02 +03:00
|
|
|
Binary
|
2024-02-29 23:19:07 +03:00
|
|
|
Plain= "text/plain"
|
|
|
|
Css= "text/css"
|
|
|
|
Html= "text/html"
|
|
|
|
Json= "application/json"
|
|
|
|
UrlEncoded= "application/x-www-form-urlencoded"
|
2024-01-03 20:39:39 +03:00
|
|
|
)
|
2024-01-10 18:23:02 +03:00
|
|
|
|