I am trying to use TIdHTTP.Get to load the USPS Zip4 result web page source into a variable (to extract the 4 digit zip code suffix), e.g.,
PgSrc := IdHTTP1.Get('https://tools.usps.com/go/ZipLookupResultsAction!input.action?resultMode=0&companyName=&address1=1600+PENNSYLVANIA+AVE+NW&address2=&city=&state=Select&urbanCode=&postalCode=&zip=20500');
The above example url works fine if I paste it into any browser. However, in my code I get an EIdIOHandlerPropInvalid error with the following message "IOHandler value is not valid."
I have many zip codes to look up, so I would appreciate any help to avoid this error or a suggestion for a different approach.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…