浏览器地址如何写访问delphi的DataSnap Rest函数时传递多个参数

Delphi Xe DataSnap Rest + Flex 开发 基本探索5(Rest 服务参数传递) 在读本文章前请参考 前面的文章 介绍 阅读详情

浏览器地址如何写访问delphi的DataSnap Rest函数时传递多个参数

 

一、服务器

比如,服务端方法:

ClientModule1.ServerMethods1Client
              .getMatserDetailFDJson(
                pCurrtPage,pRecsPerPage,
                pKeyMaster,pSqlMaster,
                pKeyDetail,pSqlDetail,pKeyDetaildetail,pSqlDetaildetail
              );

二、浏览器客户端访问:

1、假如参数如下:

          pCurrtPage1:='1';  pRecsPerPage1:='20';
          pKeyMaster:='取物品资料表';
          pSqlMaster:=' select com_id,item_id,item_name,item_type, '
            +' item_spec,maintenance_datetime from ctl03001 where com_id=''001'' ';
          pKeyDetail:=''; pSqlDetail:='';
          pKeyDetaildetail:=''; pSqlDetaildetail:='';

2、浏览器访问格式:

一个参数一个分隔符:/

http://192.168.3.100:8080/datasnap/rest/TServerMethods1/getMatserDetailFDJson/1/20/取物品资料表/select com_id,item_id,item_name,item_type,item_spec,maintenance_datetime from ctl03001 where com_id='001'////

 

李维_Delphi_XE程序设计系列2 李维 Delphi XE程序设计系列 2-开发DataSnap/REST服务器 在上次的文章中讨论了如何把传统的Delphi 主从架构应用程序逐渐转换为DataSnap JSON服务器,在本篇文章中让我们正式讨论如何使用Delphi XE开发DataSnap/REST服务器, 立即下载

相关推荐

Delphi 12.3控件之REST Servers in Delphi XE Using Datasnap.pdf

内容概要:本文介绍了如何使用 Delphi XE 和 DataSnap 开发 REST 服务器。首先,文章解释了 REST 架构的基本概念及其在 Delphi 中的支持情况,强调了 REST 的灵活性和对浏览器客户端的支持。接着,详细描述了使用 Delphi XE 创建 REST 服务器的具体步骤,包括使用 DataSnap REST Wizard 生成项目模板、配置服务器组件(如 DSHTTPWebDispatcher 和 DSAuthenticationManager)、实现基本方法(如 EchoString 和 ReverseString)以及处理复杂数据类型(如对象、数据集和流)。此外,文章还探讨了如何通过 jQuery 改进客户端界面,并展示了如何利用 jQuery 插件(如 DataTables)增强表格显示功能。最后,讨论了使用 REST 进行 CRUD 操作的方法,并简要介绍了自动化映射技术。 适合人群:熟悉 Delphi 编程语言并希望深入了解 REST 服务开发的中级开

Delphi DataSnap 流程分析(一)

好像和HTTP都没什么关系,和TDSServerTransport有关系,TCP的有个组件TDSTCPServerTransport,也看看它的继承关系。现在的方式2添加了HTTP支持,但是其实现方式不是直接通过WebModule来实现,而是转了个弯,通过桥接Indy的Http来实现。开始引入了Dispatch,到这里基本就明白了,后面的处理方式和一般的HTTP类似,只是简化了(DataSnap专用)。我们先来简要分析下方式2的流程,然后主要分析方式1的流程,方式3的流程类似方式1,就不做分析了。

舞天涯的专栏 2099

集成学习综述—bagging/随机森林/adaboost/GBDT/XGBoost/LightGBM/catboost 原理和代码介绍

集成学习介绍 文章目录集成学习介绍1 基本概念1.1 定义基本定义集成学习类别参考链接1.2 基学习器(CART)介绍公式介绍例子讲解代码实践参考链接1.3 偏差(bias)和方差(var)公式推导图解参考链接2 Boosting类2.1 原理2.2 AdaBoost2.2.2 公式推导2.2.3 优点与不足优点不足应用2.2.4 代码实践2.2.5 参考链接2.3 GBDT原理介绍代码实践参考...

fzl的博客 4620

使用DATASNAP开发RESTFUL服务

客户端请求用Delphi自带的工具进行测试(源代码在Embarcadero\Studio\20.0\source\data\rest\restdebugger,可以学习怎么提交请求)。创建一个DataSnap REST应用。

zxm8513优快云博客 1286

【硬件】通俗易懂的讲解晶体管(三极管和MOS管)的工作原理

晶体管是一个简单的元器件,可用于构建许多有趣的项目。在本文中,我将用通俗易懂的语言给您讲解晶体管的工作原理,以便您可以在电路设计中更好的使用静态管。一旦你学习这些基础知识,对以后的设计和使用来说,将会变得非常容易。我们将重点介绍两种最常见的晶体管:双极型晶体管(三极管)和MOSFET。晶体管的工作原理其实是类似于电子开关。它可以打开和关闭电路。一个简单的思考方法是将晶体管视为无源的继电器。晶体管类似于继电器,从某种意义上说,您可以使用它来打开和关闭某些东西。但晶体管也可以部分导通,一般在放大电路中使用,这部

1万+

某商场G区火灾自动报警与控制系统设计

某商场G区火灾自动报警与控制系统设计 摘要:随着我国经济建设的迅速发展,人民生活水平不断提高,城市用地日益紧张,促使建筑物正朝着高层化、密集化方向发展。高层建筑的特点决定其火灾的危险性和高层建筑的火灾自动报警系统的重要性,一套完整的火灾自动报警及联动控制系统是高层建筑发生火灾时人们生命财产的有利保障,是能否快速准确地发现火情,把火灾扑灭在萌芽状态的关键所在。文章通过消防设计,论述了火灾自动报警及消...

weixin_44026784的博客 5371

Delphi XE程序设计系列 2-开发DataSnap/REST服务器

<br /><br /><br />    在上次的文章中讨论了如何把传统的Delphi 主从架构应用程序逐渐转换为DataSnap JSON服务器,在本篇文章中让我们正式讨论如何使用Delphi XE开发DataSnap/REST服务器,由于这其中牵涉到非常多的技术,因此我们将花数篇的篇幅来讨论。现在就让我们从DataSnap/REST服务器开始。<br /><br />开发DataSnap服务器<br /><br />    Delphi XE版的DataSnap允许开发人员同时在DataSnap服务器

编程资料收集与共享交流 3840

Windows Server 2012 R2虚拟机安装全攻略:从镜像选择到网络配置一步到位

本文提供Windows Server 2012 R2虚拟机安装全攻略,涵盖从镜像选择到网络配置的完整流程。详细讲解在Oracle VM VirtualBox中的安装步骤、TCP/IP网络设置、系统优化及常见问题解决方案,帮助用户快速搭建可立即投入使用的服务器环境。特别适合IT初学者和系统管理员学习传统服务器应用的部署与配置。

weixin_28363123的博客 541

Delphi DataSnap 流程分析(二)

里分析的一样,只是到了最后,也就是方法TCustomWebDispatcher.DispatchAction(),接着进行后续处理。因而执行Dispatch := DSHTTPWebDispatcher1(TDSHTTPWebDispatcher类),这种方式只支持HTTP(普通HTTP和REST HTTP)通信,不支持TCP通信。可以看到DataSnap内部的处理还是依赖 DBX框架。这个方法比较啰嗦,要处理各种情况和格式。又到了DoCommand()方法了。客户端的方法调用处理比较繁杂。

舞天涯的专栏 1167

【Flink on k8s】- 1 - Flink Kubernetes Operator 简介 2023

Flink Kubernetes Operator 可以与 Kubernetes 的其他功能和工具集成,可以帮助用户快速定位和解决问题。Flink Kubernetes Operator可以在Kubernetes上实现高可用性,以确保 Flink 集群的稳定性和可靠性。Flink Kubernetes Operator 可以快速地部署 Flink 集群,而无需手动配置和管理集群。Flink Kubernetes Operator可以将Flink集群与其他应用程序隔离,以避免资源争用和干扰。

欢迎来到我的博客,一起探索代码里的世界! 1355

YOLOv12改进策略【独家融合改进】| SPD-Conv+PPA 再次提升模型针对小目标的特征提取能力

SPD-Conv是一种新的 CNN 构建模块,用于替代传统 CNN 架构中使用的步长卷积(strided convolution)和池化(pooling)层,它由空间到深度(Space-to-depth,SPD)层和非步长卷积(non - strided convolution)层组成。

Limiiiing的博客 1030

delphi XE6 datasnap REST 系列之一

最近想搞rest 风格的 一套框架,于是研究了 X

eloveme的专栏 3345

数据科学中的异常检测:算法与应用场景

异常检测(Anomaly Detection)是数据科学中识别数据集中异常或罕见项目的技术,这些异常项目与大多数数据显著不同。系统介绍异常检测的核心概念和技术详细解析主流异常检测算法原理提供可操作的Python实现示例探讨实际应用场景和最佳实践分析未来发展趋势和挑战本文涵盖从基础统计方法到深度学习技术的完整异常检测技术栈,适用于结构化数据和非结构化数据的异常检测场景。背景介绍:定义异常检测及其重要性核心概念:异常检测的分类和技术路线算法原理:详细解析主流算法。

AI云原生与云计算技术学院 897

DataSnap三层架构实战:从核心原理到Delphi分布式应用开发

三层架构是分布式系统设计的经典模式,通过将应用逻辑分解为表示层、业务逻辑层和数据访问层,实现了关注点分离与职责解耦。其核心原理在于通过中间件协调各层通信,将业务规则与数据访问集中管理,从而提升系统的可维护性、可扩展性与安全性。这一架构的技术价值在于能够有效支持多用户并发访问,简化客户端部署,并保障业务逻辑的一致性。在应用场景上,它尤其适合需要长期维护、业务复杂的企业级桌面应用,例如进销存、ERP等系统。本文以Delphi生态中的DataSnap框架为例,深入探讨如何利用其TCP、HTTP及REST通信模式构

congli3478的博客 480

【ESP32摄像头开发实例】-视频流接入Home Assistant

在这个项目中,我们将使用ESP32-CAM板构建一个IP监控摄像头。ESP32摄像头将托管一个视频流媒体网络服务器,您可以使用网络中的任何设备进行访问。

视觉与物联智能 796

RU DOS版、EFI版32bit/64bit BIOS常用工具

DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。

DataSnap三层架构:从原理到实践,构建稳定分布式应用

分布式系统架构的核心在于分离关注点与高效通信,通过将应用逻辑划分为客户端、服务器与数据库三层,实现业务集中化与资源优化管理。其技术价值体现在提升系统可维护性、安全性与扩展性,尤其在需要集中管理业务逻辑的桌面应用场景中优势显著。DataSnap作为Delphi平台的三层架构框架,通过TCP/IP或HTTP/HTTPS协议实现远程方法调用,支持JSON序列化与RESTful接口,便于构建跨平台服务。本文以DataSnap为例,深入探讨三层架构的设计原理、数据库连接池优化及生产环境部署要点,为传统行业遗留系统维护

congli3478的博客 490

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

idhttp.post方式 调用datasnap rest 远程方法

 idhttp.post方式 调用datasnap rest 远程方法 idhttp.get方式调用,这种比较简单,大家都会。post方式网上却没有任何成功的代码,本人也是摸索了一个上午才搞定。 分享给大家。 (1)post方式调用的远程方法,方法名必须加“update”前缀,不加行不?你试下啦。 function TServerMethods1.updateecho(c

itkeyuan的专栏 1785

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

Datasnap服务器获取GET方法参数

URL格式一: http://hostname/datasnap/rest/TServerMethods1/EchoString?p1=p1234&p2=name function TServerMethods1.EchoString(Value: string): string; begin p1 := GetInvocationMetadata.QueryParams.Valu...

newsxy的专栏 598

Delphi XE程序设计系列 1-主从架构, 多层到JSON和REST

从桌面开发,主从架构,一直到多层架构,虽然都是广泛被接受的观念和技术,但在信息技术的实作上却从不是开放, 相容的世界。Delphi从桌面开发到主从架构都是使用自己的数据传递格式以及通讯传递架构,到了多层架构虽然使用了Windows平台上的通讯协议,例 如COM/DCOM/COM+,但是在传递的数据格式方面仍然是使用自己的架构,COM/DCOM/COM+也是MS专属的通讯协议,和其它平台上使用的 通...

weixin_33935777的博客 233

delphi datasnap 服务器 接受 Post Get 方式的参数

例如 我需要 调用这个地址 并传递参数 http://localhost:8080/datasnap/rest/TServerMethods1/EchoString?aaa=abc 在 delphi 调用 function TServerMethods1.EchoString(Value: string): string; begin   Result := GetInvo

hecongzhen的专栏 4225

Delphi Xe DataSnap Rest + Flex 开发 基本探索4(返回字节流 stream)

在看本文章前,请参考前面的 部分代码和介绍

hecongzhen的专栏 1717
上一篇: FMX用AniCalculations控制基类为TScrollBox的控件是否(滑动)滚动的公共单元
下一篇: TTreeView完整的枚举和递归算法
专讲冷知识
博客等级 码龄15年 568粉丝 292原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

专讲冷知识

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值