I am trying to use TIdHTTP.Get to load the source webpage of a USPS Zip4 result into a variable (to extract the suffix of a 4-digit 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 url example above 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 invalid."
I have many zip codes to search for, so I would appreciate any help to avoid this error or suggestion for a different approach.
delphi
Max williams
source share