memories/util.go

16 lines
282 B
Go
Raw Normal View History

2022-12-03 06:06:03 +00:00
package main
import "net/http"
func GetQueryString(r *http.Request) string {
query := r.URL.Query().Encode()
if query != "" {
query = "?" + query
}
return query
}
func WriteM3U8ContentType(w http.ResponseWriter) {
w.Header().Set("Content-Type", "application/x-mpegURL")
}