delphi里的demo\httpdemo目录的post example如何使用.

lu_jian 2000-12-08 10:10:00
当网站是get方法好用,如www.163.com?aaa=xxx
但Post方法,如何处理?
多谢各位高手的指点!!!
...全文
82 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
cgxp 2000-12-19
  • 打赏
  • 举报
回复
function GetPostString(const oPostData: OleVariant): string;
var
pvd : pvardata;
pv : PVarArray;
pd : pbytearray;
p : pchar;
begin
//if Postdata = Unassigned then exit;
try
pvd := @opostdata;
//o1 := PostData;
pvd := pvd .vany;
if pvd.vtype = 0 then exit;
pv := pvd.Varray;
pd := pv.Data;
getmem(p, pv.bounds[0].ElementCount + 1);
fillchar(p^, pv.bounds[0].elementcount + 1, 0);
copymemory(p, pd, pv.bounds[0].elementcount);
Result := string(p);
freemem(p);
except
end;
end;

5,931

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧