Check if response is JSON based on content-type
(&self)
| 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 |
no test coverage detected