xmlhttprequest javascript to python