Added header to the HttpEntity to make work the xhr request