(contentType string)
| 561 | } |
| 562 | |
| 563 | func parseMimeType(contentType string) string { |
| 564 | mimeType, _, err := mime.ParseMediaType(contentType) |
| 565 | if err != nil { |
| 566 | mimeType = strings.TrimSpace(strings.Split(contentType, ";")[0]) |
| 567 | } |
| 568 | |
| 569 | return mimeType |
| 570 | } |
| 571 | |
| 572 | // Response represents a generic HTTP response. |
| 573 | type Response struct { |
no outgoing calls
no test coverage detected