private HttpRequestBase extractMethod ( RequestElements intuitRequest , URI uri ) throws FMSException { String method = intuitRequest . getRequestParameters ( ) . get ( RequestElements . REQ_PARAM_METHOD_TYPE ) ; if ( method . equals ( MethodType . GET . toString ( ) ) ) { return new HttpGet ( uri ) ; } else if ( method . equals ( MethodType . POST . toString ( ) ) ) { return new HttpPost ( uri ) ; } throw new FMSException ( "Unexpected HTTP method" ) ; }
Returns instance of HttpGet or HttpPost type depends from request parameters