@Override
    public String post(String url, String json) throws HttpServiceException, TechnicalException {
        logger.debug("HttpService POST on url: {}", url);
        Response response;
        try {
            response = getClient().newCall(new Request.Builder().url(url).post(RequestBody.create(MediaType.parse("application/json"), json)).build()).execute();
            String jsonResponse = response.body().string();
            logger.info("JSON response is: {}", jsonResponse);
            response.close();
            return jsonResponse;
        } catch (IOException e) {
            throw new HttpServiceException(Messages.format(Messages.getMessage(HttpServiceException.HTTP_SERVICE_ERROR_MESSAGE)), e);
        }
    }
@ Override public String post ( String url , String json ) throws HttpServiceException , TechnicalException { logger . debug ( "HttpService POST on url: {}" , url ) ; Response response ; try { response = getClient ( ) . newCall ( new Request . Builder ( ) . url ( url ) . post ( RequestBody . create ( MediaType . parse ( "application/json" ) , json ) ) . build ( ) ) . execute ( ) ; String jsonResponse = response . body ( ) . string ( ) ; logger . info ( "JSON response is: {}" , jsonResponse ) ; response . close ( ) ; return jsonResponse ; } catch ( IOException e ) { throw new HttpServiceException ( Messages . format ( Messages . getMessage ( HttpServiceException . HTTP_SERVICE_ERROR_MESSAGE ) ) , e ) ; } }
{@inheritDoc}