As you are doing a POST with a binary image, I think your Content-Type should be "multipart/form-data", not "application/x-www-form-urlencoded".