POST and GET requests to a server with data works