Code example for HttpPost

Methods: setEntity

0
            FileBody fileBody = new FileBody( new File( absolutePath ) );
             
            MultipartEntity entity = new MultipartEntity();
            entity.addPart( "deployWar", fileBody ); //$NON-NLS-1$
             
            HttpPost httpPost = new HttpPost();
            httpPost.setEntity( entity );
             
            Object response = httpJSONAPI( httpPost, getDeployURI(appName) );
             
            if( response instanceof JSONObject )
            { 
                JSONObject json = (JSONObject) response;
 
                if( isSuccess( json ) )
                { 
                    System.out.println( "installApplication: Sucess.\n\n" ); //$NON-NLS-1$
                } 
                else 
                { 
					if( isError( json ) )