Adds optional method variable for fooAjax methods