I've removed the third parameter on all the setRequestHeaders, changed the 1 to a string "1", and commented out the Content-Length.