Add POST handling and other updates needed for XHR tests