VBA GET request returning 404 when curl returns 200 VBA GET request returning 404 when curl returns 200 curl curl

VBA GET request returning 404 when curl returns 200


Why not use .FollowHyperlink to check if the URL exists?

See this example.

Sub Sample()  Dim url As String  url = "http://www.stopwaste.org/home/index.asp#"  Debug.Print url, CheckIfURLExists(url)  url = "http://www.Google.com"  Debug.Print url, CheckIfURLExists(url)  url = "http://www.Goo00000gle.com"  Debug.Print url, CheckIfURLExists(url)End SubFunction CheckIfURLExists(ByVal sLink As String) As Boolean    On Error Resume Next    ThisWorkbook.FollowHyperlink (sLink)    CheckIfURLExists = Err.Number = 0End Function

Screenshot:

enter image description here


Removed the '#' character and it worked just fine.

enter image description here

In Fiddler I saw that browser didn't send '#' character at all:

enter image description here


Try changing this line to include double quotes:

 zipService.send ""

Also, try reseting zipService after each URL

Set zipService = Nothing

I'm assuming the excel version works for some of your URLs since your pointing out one specific one.?.?