Request header/POSTdata support for XHR

Blocks #2282