public static void setEntity ( HttpConnection connnection , String body , String contentType ) { connnection . requestProperties . put ( "Content-type" , contentType ) ; connnection . setRequestBody ( body ) ; }
Sets a JSON String as a request entity .