idhttp的相关问题(0分)

  • 主题发起人 wubo830814
  • 开始时间
W

wubo830814

Unregistered / Unconfirmed
GUEST, unregistred user!
str1:=Tstringstream.Create('');
IdHTTP1.Get('http://www.vista123.com/rss/0.xml',str1);
我怎么判断idhttp获取成功,怎么把受str1保存到文件中
谢谢
 
var
strMsg:string;
sParams: TStringStream;
begin
sParams := TStringStream.create('');
IdHTTP1.Request.ContentType := 'application/x-www-form-urlencoded';
try
sParams.WriteString('参数1=结果&参数2=结果2') ;
strMsg:=IdHTTP1.post('http://www.xxxxx.com/add-c.asp',sParams) ;
memo1.Text:=strmsg;
finally
sParams.Free ;
end;
 
接受答案了.
 

Similar threads

D
回复
0
查看
712
DelphiTeacher的专栏
D
S
回复
0
查看
778
SUNSTONE的Delphi笔记
S
S
回复
0
查看
956
SUNSTONE的Delphi笔记
S
S
回复
0
查看
933
SUNSTONE的Delphi笔记
S
顶部