From 30010fad767e42c851d8961cdea97a4444a756ae Mon Sep 17 00:00:00 2001
From: yypsybs <yypsybs@foxmail.com>
Date: 星期三, 20 九月 2023 14:58:44 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev
---
_Main/BL/Type_PanelMaterial/StaticMethod_Send.qbl | 38 ++++++++++++++++++++++++++++++++++++--
1 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/_Main/BL/Type_PanelMaterial/StaticMethod_Send.qbl b/_Main/BL/Type_PanelMaterial/StaticMethod_Send.qbl
index d1dcf3b..fec169c 100644
--- a/_Main/BL/Type_PanelMaterial/StaticMethod_Send.qbl
+++ b/_Main/BL/Type_PanelMaterial/StaticMethod_Send.qbl
@@ -13,7 +13,7 @@
jsonBuilder := JSON::Object();
- jsonBuilder.Add( "releaseDate", Date::ActualDate().Format( "Y-M2-D2" ) );
+ jsonBuilder.Add( "releaseDate", DateTime::ActualTime().Format( "Y-M2-D2 H2:m:s" ) );
jsonBuilder.Add( "businessType", businessType );
jsonBuilder.Add( "scenarioName", scenario.Name() );
@@ -32,6 +32,40 @@
json := jsonBuilder.Build();
- info( json.AsPrettyString() );
+ //url := "/panelMaterial/send";
+
+ // for HTTPS requests:
+ //i := HTTPInterface::Create( address, 8080 );
+ //i.URL( url );
+ i := HTTPInterface::Create( address, 8080 );
+ i.MediaType( "application/json" );
+ i.URL( "/panelMaterial/send" );
+ i.PostMethod( true ); //it's not a POST method
+ //postrequestbody := '{
+ // "releaseDate": "2023-09-15 17:47:29",
+ // "businessType": "杞﹁浇",
+ // "scenarioName": "1.0 Base",
+ // "panelMaterials": [
+ // {
+ // "productID": "Body side left - E series",
+ // "productDescription": "娴嬭瘯A",
+ // "startDate": "2023-09-13",
+ // "quantity": 100.0
+ // },
+ // {
+ // "productID": "Body side left - E series",
+ // "productDescription": "娴嬭瘯B",
+ // "startDate": "2023-09-22",
+ // "quantity": 200.0
+ // }
+ // ]
+ //}';
+ postrequestbody := json.AsString();
+
+ i.Call( postrequestbody ); // Call's argument is for POST method's content.
+ htmlresult := i.Result();
+
+ info( "-----------------------鍙戦�佹柟--------------------------------" );
+ info( htmlresult.AsQUILL() );
*]
}
--
Gitblit v1.9.3