functionalized GET and POST requests