Maybe it is because of the space before urlencoded in:
"application/x-www-form- urlencoded; charset=UTF-8");Here is what I use:
obj.open('POST', url, true);
...