使用TIdHTTP POST数据到一个ASP网页,返回时只能接收到4096个字节,请问是什么原因?怎么解决?
代码如下:
function HttpPost(AURL: String; AData: String): String;
var
Response : TStringStream;
tmpStr: TStringList;
tmpHTTP: TIdHTTP;
begin
tmpHTTP:= TIdHTTP.Create(Nil);
tmpStr:= TStringList.Create;
Response := TStringStream.Create('');
try
tmpHTTP.Request.ContentType := 'application/x-www-form-urlencoded';
tmpHTTP.Request.ContentLength := Length(tmpStr.Text);
tmpStr.Add(AData);
tmpHTTP.Post(AURL, tmpStr, Response);
Result := Response.DataString;
finally
tmpHTTP.Free;
tmpStr.Free;
Response.Free;
end;
end;