title: How can I add custom header parameters to a API GET call in clojurescript
body: <p>I'm building a demo application in clojurescript with KeeFrame and to retrieve a part of the information for this website I need to call an external API which requires a custom HTTP header parameter in the GET requests</p>
  
  <p>I'm using re-frame.core for the API calls, which uses ajax.core.
  I also tried to replace this with cljs-http.client. However the result is the same.
  I already managed to add custom header parameters to the request header by using clj-http at server site. But this is not a solution I want to implement for this website because that means that I first have to rebuild the API I'm calling. So I can use it from my clojurescript without the parameter.</p>
  
  <p>This code works. A correct GET request is generated</p>
  
  <pre><code>{:http-xhrio {
   :method          :get
   :uri             (str transuri "/acquirer/" 673072009 "/acquirerref/" acquirerRefNo)
   :headers         {"Accept" "application/json"}
   :response-format (http/json-response-format {:keywords? true})
   :on-failure      [:common/set-error]}}
  </code></pre>
  
  <p>With "Accept: application/json" as a request header</p>
  
  <p>This code does not work. Instead of a GET request an OPTIONS request is generated</p>
  
  <pre><code>{:http-xhrio {
   :method          :get
   :uri             (str transuri "/acquirer/" 673072009 "/acquirerref/" acquirerRefNo)
   :headers         {"Accept" "application/json" "Custom" "Value"}
   :response-format (http/json-response-format {:keywords? true})
   :on-failure      [:common/set-error]}}
  </code></pre>
  
  <p>And in the request header "Accept: application/json" is not visible but "Access-Control-Request-Headers: custom" is</p>
  
  <p>I expected a GET request with "Accept: application/json" and "Custom: Value" in the request header.</p>
  
  <p>Can someone tell me what I'm doing wrong or provide me with a link with information about this?</p>
  
  <p>Thanks in advance</p>