added generic GET and POST methods