@ When ( "^I send a '(.+?)' request to '(.+?)'( with user and password '(.+:.+?)')?( based on '([^:]+?)')?( as '(json|string|gov)')?$" ) public void sendRequestNoDataTable ( String requestType , String endPoint , String foo , String loginInfo , String bar , String baseData , String baz , String type ) throws Exception { Future < Response > response ; String user = null ; String password = null ; if ( loginInfo != null ) { user = loginInfo . substring ( 0 , loginInfo . indexOf ( ' ' ) ) ; password = loginInfo . substring ( loginInfo . indexOf ( ' ' ) + 1 , loginInfo . length ( ) ) ; } if ( baseData != null ) { // Retrieve data String retrievedData = commonspec . retrieveData ( baseData , type ) ; // Generate request response = commonspec . generateRequest ( requestType , false , user , password , endPoint , retrievedData , type , "" ) ; } else { // Generate request response = commonspec . generateRequest ( requestType , false , user , password , endPoint , "" , type , "" ) ; } // Save response commonspec . setResponse ( requestType , response . get ( ) ) ; }
Same sendRequest but in this case we do not receive a data table with modifications . Besides the data and request header are optional as well . In case we want to simulate sending a json request with empty data we just to avoid baseData