MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / requestAccepts

Method requestAccepts

rest/handler.go:1412–1415  ·  view source on GitHub ↗
(mimetype string)

Source from the content-addressed store, hash-verified

1410}
1411
1412func (h *handler) requestAccepts(mimetype string) bool {
1413 accept := h.rq.Header.Get("Accept")
1414 return accept == "" || strings.Contains(accept, mimetype) || strings.Contains(accept, "*/*")
1415}
1416
1417func (h *handler) getBasicAuth() (username string, password string) {
1418 auth := h.rq.Header.Get("Authorization")

Callers 5

writeJSONStatusMethod · 0.95
writeRawJSONStatusMethod · 0.95
writeMultipartMethod · 0.95
handleGetDocMethod · 0.95

Calls 2

ContainsMethod · 0.65
GetMethod · 0.45

Tested by

no test coverage detected