Forum Moderators: open
My question, is there a simple way to have XML, or ASP, test the connection to the USPS server first. If it is down, I just forward he customer on with a response that shipping costs will need to be manually calculated.
Heres my code:
Dim xmlhttp
Set xmlhttp = Server.CreateObject("MSxml2.Serverxmlhttp")
xmlhttp.Open "POST","http://test.shippingapis.com/shippingapitest.dll?",false
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.send strxml
Thank you
Dim xmlhttp
Set xmlhttp = Server.CreateObject("MSxml2.Serverxmlhttp")
on error resume next
xmlhttp.Open "POST","http://test.shippingapis.com/shippingapitest.dll?",false
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.send strxml
if err.number <> 0 then
response.write err.description
end if
on error goto 0
-Matt