I can't manage to get the JSON content with a GET http request. I got the html/text content, even when I try to specify the "Accept" http header in my request.
URI uri = new org.apache.http.client.utils.URIBuilder(url) .setParameter("departureLat", "601718") .setParameter("departureLng", "2414450") .setParameter("arrivalLat", "600797") .setParameter("arrivalLng", "2429000") .build(); Request request = Request.Get(uri) .connectTimeout(5000) .addHeader("Accept: ", String.valueOf(ContentType.APPLICATION_JSON)) .socketTimeout(timeout); HttpResponse response = JsonTools.execute(service, uri, request, content); Any idea ? :)