Update getCourses to use querystring and send JSON