memories/go_vod/util.go

16 lines
284 B
Go
Raw Normal View History

2023-10-21 18:36:22 +00:00
package go_vod
2022-12-03 06:06:03 +00:00
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")
}