Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I can't find any info on this. When performing a GET request with the following format, I cant figure out how to add the request for "overrideMimeType("application/xml")":

request = OpenLayers.Request.GET({
url: "",
async: true,
callback: request_handler,

An Openlayers request like this creates the request object and sends it all in this single code. I know if I weren't using the OpenLayers API, I would do something like:


But I can't get this to work using using my format. Any ideas? Thanks!

share|improve this question
up vote 1 down vote accepted

Yoy should use headers property of OpenLayers.Request object:

request = OpenLayers.Request.GET({
    url: "",
    callback: request_handler,
    headers: {
        "Content-Type": "application/xml"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.