title: HTTP Get Request Using VBA in OSX Excel
body: <p>I'm writing a very simple macro that needs to make an HTTP GET request to a server and the response is not important (it initiates a process on the server). The HTTP GET does NOT require authentication.</p>
  
  <p>I'm using the following code to do this "successfully" (the server logs indicated the request made it to the server, but the server is running HTTP 406):</p>
  
  <pre><code>Function callAPI(Url As String)
      With ActiveSheet.QueryTables.Add(Connection:="URL;" &amp; Url, Destination:=Range("D15"))
      .PostText = ""
      .RefreshStyle = xlOverwriteCells
      .SaveData = True
      .Refresh
      End With
  End Function
  </code></pre>
  
  <p>But I get back the following response from the server:</p>
  
  <pre><code>Unable to open http://someurl.com Cannot locate the Internet server or proxy server.
  </code></pre>
  
  <p>I can see the server is return an HTTP 406 which, after some research is occurring because the GET request is not sending the correct <code>Content-Type</code> header.</p>
  
  <p>So my question is - how do tell <code>ActiveSheet.QueryTables.Add</code> to set the header, or how do I modify my NGINX config to support this specific GET CALL</p>