Fix malformed POST requests being sent, due to wrong headers