GetContentLength returns the request's header value of "Content-Length".
()
| 1454 | // GetContentLength returns the request's |
| 1455 | // header value of "Content-Length". |
| 1456 | func (ctx *Context) GetContentLength() int64 { |
| 1457 | if v := ctx.GetHeader(ContentLengthHeaderKey); v != "" { |
| 1458 | n, _ := strconv.ParseInt(v, 10, 64) |
| 1459 | return n |
| 1460 | } |
| 1461 | return 0 |
| 1462 | } |
| 1463 | |
| 1464 | // StatusCode sets the status code header to the response. |
| 1465 | // Look .GetStatusCode & .FireStatusCode too. |