MCPcopy Create free account
hub / github.com/kataras/iris / GetContentLength

Method GetContentLength

context/context.go:1456–1462  ·  view source on GitHub ↗

GetContentLength returns the request's header value of "Content-Length".

()

Source from the content-addressed store, hash-verified

1454// GetContentLength returns the request's
1455// header value of "Content-Length".
1456func (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.

Callers

nothing calls this directly

Calls 1

GetHeaderMethod · 0.95

Tested by

no test coverage detected