public < T extends J4pRequest > HttpUriRequest getHttpRequest ( List < T > pRequests , Map < J4pQueryParameter , String > pProcessingOptions ) throws UnsupportedEncodingException , URISyntaxException { JSONArray bulkRequest = new JSONArray ( ) ; String queryParams = prepareQueryParameters ( pProcessingOptions ) ; HttpPost postReq = new HttpPost ( createRequestURI ( j4pServerUrl . getPath ( ) , queryParams ) ) ; for ( T request : pRequests ) { JSONObject requestContent = getJsonRequestContent ( request ) ; bulkRequest . add ( requestContent ) ; } postReq . setEntity ( new StringEntity ( bulkRequest . toJSONString ( ) , "utf-8" ) ) ; return postReq ; }
Get an HTTP Request for requesting multiples requests at once