Set up the HTTP connection to send data to server