Add xhr post method + test

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