TIdHTTP.Get EIdIOHandlerPropInvalid Error
2016-10-22 17:24
309 查看
{$APPTYPE CONSOLE} {$R *.res} uses IdHTTP, IdSSLOpenSSL, SysUtils; Var IdHTTP1 : TIdHTTP; Src : string; LHandler: TIdSSLIOHandlerSocketOpenSSL; begin try IdHTTP1:=TIdHTTP.Create(nil); try LHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil); try IdHTTP1.IOHandler:=LHandler; Src:= 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'); Writeln(Src); finally LHandler.Free; end; finally IdHTTP1.Free; end; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; Readln; end. Note : Also remember copy the SSL DLL (libeay32.dll, ssleay32.dll) to your system. down voteaccepted | To avoid this exception you must assign the IOHandler property. |
13down voteaccepted | To avoid this exception you must assign the IOHandler property. |
相关文章推荐
- 关于 WinHttpWriteData 出错 GetLastError() 值为 87(ERROR_INVALID_PARAMETER)
- InternalServerError时 HttpWebRequest 的 GetResponse 方法处理策略
- HttpSendRequest 12005 ERROR_INTERNET_INVALID_URL
- TIdHTTP get参数带中文解决方法--请求报文
- django error:DisallowedHost: Invalid HTTP_HOST header: ''. You may need to add u'' to ALLOWED_HOST
- 运行scrapy shell 'http://quotes.toscrape.com'出现错误ValueError: invalid hostname: 'http
- InternalServerError时 HttpWebRequest 的 GetResponse 方法处理策略
- _http_outgoing.js:360 throw new TypeError('The header content contains invalid characters');
- twisted.internet.error.DNSLookupError: DNS lookup failed: address "'http:" not found: [Errno 11001] getaddrinfo failed.解决办法
- web端 出报错 GET http://localhost/favicon.ico 500 (INTERNAL SERVER ERROR)
- error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http:/
- php file_get_contents()报错 failed to open stream: HTTP request failed!、Internal Server Error
- error 102: Invalid namespace http://ns.adobe.com/air/extension/4.0
- Shmget: Invalid argument. Why i get this error?
- Delphi xe5 控件TIdhttp的用法post,get解决中文乱码问题
- ubuntu中运行 sudo apt-get update 报错:W: GPG error: http://cn.archive.ubuntu.com vivid Release: The follo
- 关于W: GPG error: http://extras.ubuntu.com oneiric Release: The following signatures were invalid: BADSIG 16126D3A3E5C1192
- Delphi xe5 控件TIdhttp的用法post,get解决中文乱码问题
- Need better Node.js http.get request error handling
- error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.28/version: open //./pipe/docker_