mirror of
https://gitee.com/johng/gf
synced 2026-06-27 09:47:19 +08:00
jsonp does not need Content-Type of application/json
This commit is contained in:
@ -60,7 +60,7 @@ func (r *Response) WriteJsonP(content interface{}) error {
|
||||
if b, err := gparser.VarToJson(content); err != nil {
|
||||
return err
|
||||
} else {
|
||||
r.Header().Set("Content-Type", "application/json")
|
||||
//r.Header().Set("Content-Type", "application/json")
|
||||
if callback := r.request.Get("callback"); callback != "" {
|
||||
buffer := []byte(callback)
|
||||
buffer = append(buffer, byte('('))
|
||||
|
||||
Reference in New Issue
Block a user