public static HttpConnection createPost ( URI uri , String body , String contentType ) { HttpConnection connection = Http . POST ( uri , "application/json" ) ; if ( body != null ) { setEntity ( connection , body , contentType ) ; } return connection ; }
create a HTTP POST request .