public static String getDefaultMediaType ( ResultType expectedType ) { ResponseFormat format = ( expectedType != null ) ? defaultTypeFormats . get ( expectedType ) : null ; // If the expected type is unknown, we should let the server decide, otherwise we could // wind up requesting a response type that doesn't match the actual resuts (e.g. xml with CONSTRUCT). // TODO: We could include multiple media types in the Accept: field, but that assumes that the // server has proper support for content negotiation. Many servers only look at the first value. return ( format != null ) ? format . mimeText : null ; }
Gets the default content type to use when sending a query request with the given expected result type .