Added optional Ajax headers to RESTAdapter. Resolves #803