rest-assured/src/main/java/io/restassured/internal/http/HttpResponseContentTypeFinder.java
public static String findContentType(HttpResponse resp) {
        Header contentTypeHeader = resp.getFirstHeader(HttpHeaders.CONTENT_TYPE);

        if ( contentTypeHeader == null )
            throw new IllegalArgumentException( "Response does not have a content-type header" );
        try {
            return contentTypeHeader.getValue();
        }
        catch ( RuntimeException ex ) {  // NPE or OOB Exceptions
            throw new IllegalArgumentException( "Could not parse content-type from response" );
        }
    }
public static String findContentType(HttpResponse resp) {
        Header contentTypeHeader = resp.getFirstHeader(HttpHeaders.CONTENT_TYPE);

        if ( contentTypeHeader == null )
            throw new IllegalArgumentException( "Response does not have a content-type header" );
        try {
            return contentTypeHeader.getValue();
        }
        catch ( RuntimeException ex ) {  // NPE or OOB Exceptions
            throw new IllegalArgumentException( "Could not parse content-type from response" );
        }
    }
Helper method to get the content-type string from the response
(no charset).
@param resp