private void setEntity ( HttpEntityEnclosingRequestBase httpRequest , String json ) { StringEntity entity = new StringEntity ( json , "UTF-8" ) ; entity . setContentType ( "application/json" ) ; httpRequest . setEntity ( entity ) ; }
Sets a JSON String as a request entity .