Anypoint proxy appears to overwrite request headers


In my RAML file, I’ve specified request headers for GET, for example:



(In my RAML file, it’s something similar to the above but I’ve made the URL look generic here to avoid exposing the actual URL I’m using.)

When I use the Try it button to test the GET, and capture the request using Chrome dev tools, I find that:

  1. The header I specified is overwritten.

  2. Custom headers I have added are dropped from the request.

I am attempting to use an API that needs the request headers to be what I specify in the RAML file.

Is the Anypoint proxy overwriting my headers, as it seems to be doing?

dev tools tells me that the request URL is now:

Is there any way to ensure that the request headers specified in my RAML actually reach my server at


I’m not sure I’m getting the problem.
Do you have any way of sharing the entire RAML file?

Best Regards.


Here is the relevant chunk of the RAML file:

  - collection:
      description: | 
        Collection of available <<resourcePathName>>. <br /> <br /> POST creates an <<resourcePathName|!singularize>>. GET shows an index. 
        description: Get a list of <<resourcePathName>>.
            example: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
            example: gzip,deflate,sdch
            example: en-US,en;q=0.8
            example: keep-alive
            example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36
            displayName: X-Custom-Test-Header 
            example: this-is-a-test-header
                example: |
                example: |
                  {"message": "internal server error" }

Request headers are specified for the GET method of the collection resource type.

When I use Try it with GET and look at what headers the browser is actually sending (captured with Chrome dev tools), the headers specified in the RAML are ignored.

I would like to know why that is, and whether there is a way to ensure that the request headers in the RAML are actually used.

Is that clearer? Thanks much for looking!


Yes it is. In fact, I’m seeing the same problem with SOME headers (others are OK).

As seen in the attached image:

  • accept: OK
  • accept-encoding: FAIL
  • accept-language: OK
  • connection: FAIL
  • host: FAIL
  • x-custom-test-header: OK

I’m reporting this internally to be checked ASAP.
Thanks for opening the thread and clarifying!


After discussing with @scordatura I believe his original issue was a misleading UI in the console: the example values for the headers were shown in gray in the console’s form fields, and he interpreted that as being auto-filled while in fact the fields were empty and awaiting him to fill them. Once he understood and filled them, they were submitted just fine. The new console, soon to be released, will address this usability issue.