Fix transport to REST in Xhr case.