Fix typos in context.go (#2551)
This commit is contained in:
parent
65ed60ed13
commit
7742ff50e0
@ -891,7 +891,7 @@ func (c *Context) SecureJSON(code int, obj interface{}) {
|
||||
}
|
||||
|
||||
// JSONP serializes the given struct as JSON into the response body.
|
||||
// It add padding to response body to request data from a server residing in a different domain than the client.
|
||||
// It adds padding to response body to request data from a server residing in a different domain than the client.
|
||||
// It also sets the Content-Type as "application/javascript".
|
||||
func (c *Context) JSONP(code int, obj interface{}) {
|
||||
callback := c.DefaultQuery("callback", "")
|
||||
@ -968,7 +968,7 @@ func (c *Context) DataFromReader(code int, contentLength int64, contentType stri
|
||||
})
|
||||
}
|
||||
|
||||
// File writes the specified file into the body stream in a efficient way.
|
||||
// File writes the specified file into the body stream in an efficient way.
|
||||
func (c *Context) File(filepath string) {
|
||||
http.ServeFile(c.Writer, c.Request, filepath)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user