MCPcopy Create free account
hub / github.com/cli/cli / contentType

Method contentType

script/ghmock/store.go:34–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32}
33
34func (r response) contentType() string {
35 for name, value := range r.Headers {
36 if strings.EqualFold(name, "Content-Type") {
37 return value
38 }
39 }
40 if r.RawBody != nil {
41 return "application/octet-stream"
42 }
43 return "application/json; charset=utf-8"
44}
45
46func (r response) status() int {
47 if r.Status == 0 {

Callers 2

ServeHTTPMethod · 0.80
checkMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected