public boolean setCustomResponse ( String pathValue , String requestType , String customData ) { try { JSONObject path = getPathFromEndpoint ( pathValue , requestType ) ; if ( path == null ) { String pathName = pathValue ; createPath ( pathName , pathValue , requestType ) ; path = getPathFromEndpoint ( pathValue , requestType ) ; } String pathId = path . getString ( "pathId" ) ; resetResponseOverride ( pathId ) ; setCustomResponse ( pathId , customData ) ; return toggleResponseOverride ( pathId , true ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } return false ; }
Sets a custom response on an endpoint