docs: @SuppressWarnings("unchecked")
  	public <S extends Object, R extends Object> Response<R> executeQuery(final Query<S, R> query)
  			throws FreesoundClientException {
  		final HttpRequest request = buildHTTPRequest(query);
  		final String credential = buildAuthorisationCredential(query);
  
  		if (credential != null) {
  			request.header("Authorization", credential);
  		}
  
  		try {
  			if (query instanceof JSONResponseQuery) {
  				final HttpResponse<JsonNode> httpResponse = request.asJson();
  				final S responseBody = (S) httpResponse.getBody().getObject();
  
  				return query.processResponse(httpResponse.getStatus(), httpResponse.getStatusText(), responseBody);
  			} else if (query instanceof BinaryResponseQuery) {
  				final HttpResponse<InputStream> httpResponse = request.asBinary();
  				final S responseBody = (S) httpResponse.getBody();
  
  				return query.processResponse(httpResponse.getStatus(), httpResponse.getStatusText(), responseBody);
  			} else {
  				throw new FreesoundClientException(String.format("Unknown request type: %s", query.getClass()));
  			}
  		} catch (final ClassCastException | UnirestException e) {
  			throw new FreesoundClientException("Error when attempting to make API call", e);
  		}
  	}