Add xhr post method + test

Hi,

I never tried testing, so I'm not sure about the scripting test. If you have a great documentation or tutorial for this that would be great !