Changed code to submit POST request