title: How to pass custom headers while calling a web api using Swagger(Swashbuckle)
body: <p>We are using Swashbuckle to document our web apis and use it to test our web apis. I want to know how one can pass multiple custom headers with different values for each request using Swagger UI.</p>
  
  <p>I have seen an answer like below in the internet to pass a header in Swagger UI but was unable to get my head around it. What's confusing is about the SwaggerExtensions file. What is the purpose of this file and why is there a mention of this file in the qualified name of the js file.</p>
  
  <p>1.Add new file named “SwaggerExtensions”, then added new JS file named “onComplete.js”, you have to change the build action for this file to “Embedded Resource”.</p>
  
  <p>2.Inside the file “onComplete.js” paste the following code:</p>
  
  <pre><code>$('#input_apiKey').change(function () {
  
  var key = $('#input_apiKey')[0].value;
  if (key &amp;&amp; key.trim() != "") {
  key = "Bearer " + key;
  window.authorizations.add("key", new ApiKeyAuthorization("Authorization",   key, "header"));
  }
  });
  </code></pre>
  
  <p>3.Open file “SwaggerConfig.cs” and inside the register method paste the code below:</p>
  
  <pre><code>SwaggerUiConfig.Customize(c =&gt;
  {
   c.SupportHeaderParams = true;
   c.InjectJavaScript(typeof(SwaggerConfig).Assembly,        "AngularJSAuthentication.API.SwaggerExtensions.onComplete.js");
  });
  </code></pre>