zoukankan      html  css  js  c++  java
  • unigui作中间件使用

    unigui作中间件使用

    可返回string或者tstream数据。

    如果返回JSON字符,则UNIGUI就是REST 中间件。

    procedure TUniServerModule.UniGUIServerModuleHTTPCommand(ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo; var Handled: Boolean);
    var
    cmd, sql: string;
    begin
    cmd := ARequestInfo.URI;
    if Pos('query', cmd) > 0 then
    begin
    sql := ARequestInfo.Params.Values['sql'];
    if sql <> '' then
    begin
    Handled := true;
    AResponseInfo.CharSet := 'UTF-8';
    AResponseInfo.ContentType := 'UTF-8';
    AResponseInfo.ContentText := 'unigui中间件';
    end;
    end;
    end;

    浏览器打开 URL:http://127.0.0.1:9999/query/?sql=select * from tgoods



  • 相关阅读:
    整理牙刷
    color 圆盘染色
    数论の一波流[长期更新]
    生成树
    一维黑白棋
    Factorials
    平面分割问题
    poj1183 反正切函数
    烽火传递
    校门外的树
  • 原文地址:https://www.cnblogs.com/hnxxcxg/p/7608711.html
Copyright © 2011-2022 走看看