MCPcopy Create free account
hub / github.com/imroc/req / ReadMIMEHeader

Method ReadMIMEHeader

textproto_reader.go:225–227  ·  view source on GitHub ↗

ReadMIMEHeader reads a MIME-style header from r. The header is a sequence of possibly continued Key: Value lines ending in a blank line. The returned map m maps [CanonicalMIMEHeaderKey](key) to a sequence of values in the same order encountered in the input. For example, consider this input: My-K

()

Source from the content-addressed store, hash-verified

223// "Long-Key": {"Even Longer Value"},
224// }
225func (r *textprotoReader) ReadMIMEHeader() (textproto.MIMEHeader, error) {
226 return r.readMIMEHeader(math.MaxInt64, math.MaxInt64)
227}
228
229// readMIMEHeader is a version of ReadMIMEHeader which takes a limit on the header size.
230// It is called by the mime/multipart package.

Callers 2

_readResponseMethod · 0.80
readTrailerMethod · 0.80

Calls 1

readMIMEHeaderMethod · 0.95

Tested by

no test coverage detected