added xml and additional headers support