' execShell() function courtesy of Robert Knight via StackOverflow ![]() tRequestHeader "User-Agent", "Mozilla/4.0 (compatible MSIE 6.0 Windows NT 5.0)" ObjHTTP.Open "GET", URL & "?" & sQuery, False ![]() Set objHTTP = CreateObject("WinHttp.WinHttpRequest.5.1") I would credit the authors of this because I certainly didnt write this from scratch but I have lost track of where it all came from: #If Win32 Thenįunction getHTTP(URL As String, sQuery As String) As String Here is a piece of code that supports both OSX and Windows. So my question is - how do tell to set the header, or how do I modify my NGINX config to support this specific GET CALL 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 Content-Type header. With (Connection:="URL " & Url, Destination:=Range("D15"))īut I get back the following response from the server: Unable to open Cannot locate the Internet server or proxy server. ![]() 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): Function callAPI(Url As String) The HTTP GET does NOT require authentication. 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).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |