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

Method GetContentTypeRequested

context/context.go:1449–1452  ·  view source on GitHub ↗

GetContentTypeRequested returns the request's trim-ed(without the charset and priority values) header value of "Content-Type".

()

Source from the content-addressed store, hash-verified

1447// trim-ed(without the charset and priority values)
1448// header value of "Content-Type".
1449func (ctx *Context) GetContentTypeRequested() string {
1450 // could use mime.ParseMediaType too.
1451 return TrimHeaderValue(ctx.GetHeader(ContentTypeHeaderKey))
1452}
1453
1454// GetContentLength returns the request's
1455// header value of "Content-Length".

Callers 5

IsGRPCMethod · 0.95
ReadBodyMethod · 0.95
afterMethod · 0.80
FromJSONFunction · 0.80
SigninHandlerMethod · 0.80

Calls 2

GetHeaderMethod · 0.95
TrimHeaderValueFunction · 0.85

Tested by

no test coverage detected