idhttp POST 数据完,memo中返回不了正常数据
idhttp POST 数据完,memo中返回不了正常数据,求大神看看
procedure TForm3.Button1Click(Sender: TObject);
var
kirim: TStrings;
hasil: String;
text:string;
begin
IdHttp1.Request.UserAgent :='Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0';
Idhttp1.Request.Accept :='text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
Idhttp1.Request.ContentLanguage :='zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3';
IdHttp1.Request.AcceptEncoding:='gzip, deflate';
Idhttp1.Request.ContentType :='application/x-www-form-urlencoded';
IdHttp1.Request.Connection := 'keep-alive';
Kirim := TstringList.Create;
try
kirim.Add('siteid'+'='+'1'+'&'+'modelid'+'='+'2'+'&'+'username'+'='+GetRandStr(8)+'&'+'password'+'='+'1qaz998998'
+'&'+'pwdconfirm'+'='+'1qaz998998'+'&'+'email='+GetRandStr(8)+'@'+'163'+'.'+'com'+'&'+'nickname'+'='+'hellko'
+'&'+'dosubmit'+'='+'1'+'&'+'protocol'+'='+'&'+'info'+'['+'content'+']'+'='+'<'+'img'+' '+'src'+'='+edit1.text+'?'+'.'+'php'+'#'+'.'+'jpg'+'>');
hasil := IdHttp1.POST('http://'+edit2.Text+'/index.php?m=member&c=index&a=register&siteid=1',kirim);
memo1.Lines.Add(hasil);
finally
end;
Kirim.Free;
end;
...全文
相关推荐
Delphi2007下有ssl的idhttp对https的url地址post一个json串Demo
idHttp带json然后post到某个url已经比较普遍,但是如果是https的post就会不太一样,常用的post会报错或不成功,这时需要用到IdSSLIOHandlerSocketOpenSSL控件,和3个关键dll(libeay32.dll,ssleay32.dll,libssl32.dll)放到exe同级目录或system32(64位exe放systemWOW64)。 请注意:Delphi XE和Delphi2007及以下版本用到的两个dll虽同名但是不一样的! 本程序是Delphi2007下开发,应该适用2007及以下版本! 记得这3个dll带上,XE和2007都可以用了,时间久了有点忘记了,如果XE不行我也上传过XE的demo,我的下载资源里找下
http post 简单 不用安装 delphi 源码
http post 简单 不用安装 delphi 源码 http post 简单 不用安装 delphi 源码
DelphiIDHTTP控件GETPOST请求共3页.pd
DelphiIDHTTP控件GETPOST请求共3页.pdf.zip
indy10.1.5.0chm帮助
官方indy10.1.5.0的帮助文件,chm格式
Delphi编写天气预报查询小程序[参考].pdf
Delphi编写天气预报查询小程序[参考].pdf


网络通信/分布式开发
