public RequestBuilder createDefaultRequestBuilder ( String httpUrl , String methodName , String reqBodyAsString ) { RequestBuilder requestBuilder = RequestBuilder . create ( methodName ) . setUri ( httpUrl ) ; if ( reqBodyAsString != null ) { HttpEntity httpEntity = EntityBuilder . create ( ) . setContentType ( APPLICATION_JSON ) . setText ( reqBodyAsString ) . build ( ) ; requestBuilder . setEntity ( httpEntity ) ; } return requestBuilder ; }
This is the usual http request builder most widely used using Apache Http Client . In case you want to build or prepare the requests differently you can override this method .