title: How to get Swagger to send API key as a http instead of in the URL
body: <p>I am using swagger with <a href="https://github.com/ServiceStack/ServiceStack/wiki/Swagger-API">servicestack</a> but I am getting a 401 unauthorised error from my /resources URL becuase it requires an API key.</p>
  
  <p>Unless I'm mistaken, <a href="https://github.com/wordnik/swagger-ui">according to the documentation</a> I should set <em>supportHeaderParams</em> to true as well as the <em>apiKeyName</em> and <em>apiKey</em> value in the JSON parameters when initializing Swagger from my html page. </p>
  
  <p>I was then expecting to see my API key in the http request headers, but it is still being appended to the URL and not in the headers collection.</p>
  
  <p>Here is the code that initialises Swagger in my HTML page:</p>
  
  <pre><code> window.swaggerUi = new SwaggerUi({
              discoveryUrl: "http://pathtomyservice.com/resources",
                  headers: { "testheader" : "123" },
                  apiKey: "123",
                  apiKeyName: "Api-Key",
                  dom_id:"swagger-ui-container",
                  supportHeaderParams: true,
                  supportedSubmitMethods: ['get', 'post', 'put', 'delete'],
                  onComplete: function(swaggerApi, swaggerUi){
                      if(console) {
                          console.log("Loaded SwaggerUI");
                          console.log(swaggerApi);
                          console.log(swaggerUi);
                      }
                    $('pre code').each(function(i, e) {hljs.highlightBlock(e)});
                  },
                  onFailure: function(data) {
                      if(console) {
                          console.log("Unable to Load SwaggerUI");
                          console.log(data);
                      }
                  },
                  docExpansion: "none"
              });
  </code></pre>
  
  <p>Unfortunately I get no headers at all, no 'Api-Key' or 'testheader'. </p>