MCPcopy Create free account
hub / github.com/bajrangCoder/setu / is_json

Method is_json

src/entities/response.rs:392–394  ·  view source on GitHub ↗

Check if response is JSON based on content-type

(&self)

Source from the content-addressed store, hash-verified

390
391 if ct.contains("application/json") || ct.contains("text/json") || ct.ends_with("+json") {
392 ContentCategory::Json
393 } else if ct.contains("text/html") {
394 ContentCategory::Html
395 } else if ct.contains("application/xml") || ct.contains("text/xml") || ct.ends_with("+xml")
396 {
397 ContentCategory::Xml

Callers 1

formatted_bodyMethod · 0.80

Calls 1

content_categoryMethod · 0.80

Tested by

no test coverage detected