public static HttpRequestBase post ( String path , Map < String , String > headers , Map < String , String > parameters , HttpEntity entity , Integer timeOutInSeconds ) { HttpPost post = new HttpPost ( path ) ; addHeaders ( post , headers ) ; addParameters ( post , parameters ) ; post . setConfig ( getConfig ( timeOutInSeconds ) ) ; if ( entity != null ) { post . setEntity ( entity ) ; } return post ; }
Step 1 . prepare POST request