MCPcopy
hub / github.com/writefreely/writefreely / IsJSON

Function IsJSON

request.go:19–23  ·  view source on GitHub ↗
(r *http.Request)

Source from the content-addressed store, hash-verified

17)
18
19func IsJSON(r *http.Request) bool {
20 ct, _, _ := mime.ParseMediaType(r.Header.Get("Content-Type"))
21 accept := r.Header.Get("Accept")
22 return ct == "application/json" || accept == "application/json"
23}
24
25func IsActivityPubRequest(r *http.Request) bool {
26 accept := r.Header.Get("Accept")

Callers 15

newPostFunction · 0.85
existingPostFunction · 0.85
signupFunction · 0.85
signupWithRegistrationFunction · 0.85
loginFunction · 0.85
viewExportPostsFunction · 0.85
viewMeAPIFunction · 0.85
viewMyPostsAPIFunction · 0.85
viewMyCollectionsAPIFunction · 0.85
updateSettingsFunction · 0.85
handleErrorMethod · 0.85
newCollectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected