protected ClientResponse doPostForProxy ( String path , InputStream inputStream , MultivaluedMap < String , String > parameterMap , MultivaluedMap < String , String > headers ) throws ClientException { this . readLock . lock ( ) ; try { WebResource . Builder requestBuilder = getResourceWrapper ( ) . rewritten ( path , HttpMethod . POST , parameterMap ) . getRequestBuilder ( ) ; copyHeaders ( headers , requestBuilder ) ; return requestBuilder . post ( ClientResponse . class , inputStream ) ; } catch ( ClientHandlerException ex ) { throw new ClientException ( ClientResponse . Status . INTERNAL_SERVER_ERROR , ex . getMessage ( ) ) ; } finally { this . readLock . unlock ( ) ; } }
Passes a new resource form or other POST body to a proxied server .