writefreely/request.go

9 lines
136 B
Go
Raw Normal View History

package writefreely
import "mime"
func IsJSON(h string) bool {
ct, _, _ := mime.ParseMediaType(h)
return ct == "application/json"
}