public GHGeocodingResponse geocode(GHGeocodingRequest request) {
        String url = buildUrl(request);

        try {
            Request okRequest = new Request.Builder().url(url).build();
            ResponseBody rspBody = getClientForRequest(request).newCall(okRequest).execute().body();
            return objectMapper.readValue(rspBody.bytes(), GHGeocodingResponse.class);
        } catch (Exception ex) {
            throw new RuntimeException("Problem performing geocoding for " + url + ": " + ex.getMessage(), ex);
        }
    }
public GHGeocodingResponse geocode ( GHGeocodingRequest request ) { String url = buildUrl ( request ) ; try { Request okRequest = new Request . Builder ( ) . url ( url ) . build ( ) ; ResponseBody rspBody = getClientForRequest ( request ) . newCall ( okRequest ) . execute ( ) . body ( ) ; return objectMapper . readValue ( rspBody . bytes ( ) , GHGeocodingResponse . class ) ; } catch ( Exception ex ) { throw new RuntimeException ( "Problem performing geocoding for " + url + ": " + ex . getMessage ( ) , ex ) ; } }
Perform a geocoding request. Both forward and revers are possible, just configure the <code>request</code>
accordingly.

@param request the request to send to the API
@return found results for your request