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;