delphi7 post 如何多参数传递

yinsoft1978 2018-10-23 12:56:51
{info:{"access_token":"430501ee7a824ec79415b79e0653ca54"}basicInfo:{"vehicleplatenumber":"e001a","companyname":"eeee","vin":"2321","repairdate":"20181020","repairmileage":"20000","settledate":"20181023","faultdescription":"3333","costlistcode":"e20410"}}


比如这个字符,怎么用?
Param.Add('info="access_token":"430501ee7a824ec79415b79e0653ca54"');
Param.Add('basicInfo="vehicleplatenumber":"e001a","companyname":"eeee","vin":"2321","repairdate":"20181020","repairmileage":"20000","settledate":"20181023","faultdescription":"3333","costlistcode":"e20410"');
这样吗?高手能解答吗
...全文
567 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
qtc26 2018-10-23
  • 打赏
  • 举报
回复
send.postdata:='{info:{"access_token":"430501ee7a824ec79415b79e0653ca54"}basicInfo:{"vehicleplatenumber":"e001a","companyname":"eeee","vin":"2321","repairdate":"20181020","repairmileage":"20000","settledate":"20181023","faultdescription":"3333","costlistcode":"e20410"}}';
postd:=tstringstream.Create('');
try
postd.WriteString(send.postdata);
http.Request.ContentLength:=postd.Size;
http.post(send.url,postd,response);
finally
postd.Free;
end;
p47655255 2018-10-23
  • 打赏
  • 举报
回复
按json格式提交不行吗?
qtc26 2018-10-23
  • 打赏
  • 举报
回复
sendrecord=record
ord:integer;
num:string;
url:string;
host:string;
refer:string;
useragent:string;
accept:string;
myheader:string;
cookie:string;
postdata:string;
acceptencoding:string;
contenttype:string;
ProxyServer:string;
ProxyPort:integer;
image:tmemorystream;
yzm:string;
tag:string;
end;
var
send:sendrecord;
你这里没必要用记录,直接url和postdata两个参数就可以了。
yinsoft1978 2018-10-23
  • 打赏
  • 举报
回复
send是什么类型的数据?怎么定义?

1,594

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 网络通信/分布式开发
社区管理员
  • 网络通信/分布式开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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