protected HttpRequestBase findMethod ( final String name , final URI uri ) throws HttpException { String nm = name . toUpperCase ( ) ; if ( "PUT" . equals ( nm ) ) { return new HttpPut ( uri ) ; } if ( "GET" . equals ( nm ) ) { return new HttpGet ( uri ) ; } if ( "DELETE" . equals ( nm ) ) { return new HttpDelete ( uri ) ; } if ( "POST" . equals ( nm ) ) { return new HttpPost ( uri ) ; } if ( "PROPFIND" . equals ( nm ) ) { return new HttpPropfind ( uri ) ; } if ( "MKCALENDAR" . equals ( nm ) ) { return new HttpMkcalendar ( uri ) ; } if ( "MKCOL" . equals ( nm ) ) { return new HttpMkcol ( uri ) ; } if ( "OPTIONS" . equals ( nm ) ) { return new HttpOptions ( uri ) ; } if ( "REPORT" . equals ( nm ) ) { return new HttpReport ( uri ) ; } if ( "HEAD" . equals ( nm ) ) { return new HttpHead ( uri ) ; } throw new HttpException ( "Illegal method: " + name ) ; }
Specify the next method by name .