delphi WebServerApplication获取参数URL文件名及参数  
官方Delphi 学习QQ群: 682628230(三千人)
频道

delphi WebServerApplication获取参数URL文件名及参数


delphi WebServerApplication获取参数URL文件名及参数


procedure TWebModule1.WebModule1DefaultHandlerAction(Sender: TObject;

Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);

begin

Form1.Memo1.Lines.Add(Request.PathInfo); //获取文件名 http://localhost:8080/asdf.js?a=123&b=666


Form1.Memo1.Lines.Add( Request.Query ); //获取参数

for I := 0 to Request.QueryFields.Count-1 do //取数数个数

begin

Form1.Memo1.Lines.Add( Request.QueryFields[i] ); //取单个参数

end;


end;

————————————————


原文链接:https://blog.csdn.net/yygyyygy1233/article/details/106592634/



推荐分享
图文皆来源于网络,内容仅做公益性分享,版权归原作者所有,如有侵权请告知删除!
 

Copyright © 2014 DelphiW.com 开发 源码 文档 技巧 All Rights Reserved
晋ICP备14006235号-8 晋公网安备 14108102000087号

执行时间: 0.03744101524353 seconds