GET and POST requests working with api.