Fixed the Response code check and fixed method visibility
Changed return types to Map<String,Object> as return types can vary