From b0ffdf16f04d1ee25d0b0bb091dd46c613d2355c Mon Sep 17 00:00:00 2001 From: Vinicius Sanchez Date: Tue, 31 Jan 2023 22:35:11 -0300 Subject: [PATCH] Horse 3.0.2 --- .gitignore | 5 +- Demo/Demo.dpr | 21 +- Demo/Demo.dproj | 345 ++++++++++++++++++++++-- Demo/boss-lock.json | 6 +- Demo/boss.json | 4 +- Loggastic.dproj | 458 ++++++++++++++++++++++++++++++-- Loggastic.res | Bin 640 -> 0 bytes boss-lock.json | 8 +- boss.json | 6 +- src/Horse.Loggastic.pas | 6 +- src/Providers/Providers.Log.pas | 90 +++---- 11 files changed, 822 insertions(+), 127 deletions(-) delete mode 100644 Loggastic.res diff --git a/.gitignore b/.gitignore index eddd78f..4f2fad1 100644 --- a/.gitignore +++ b/.gitignore @@ -5,10 +5,11 @@ ### Delphi ### # Uncomment these types if you want even more clean repository. But be careful. # It can make harm to an existing project source. Read explanations below. -# + # Resource files are binaries containing manifest, project icon and version info. # They can not be viewed as text or compared by diff-tools. Consider replacing them with .rc files. -#*.res +*.res + # Type library file (binary). In old Delphi versions it should be stored. # Since Delphi 2009 it is produced from .ridl file and can safely be ignored. #*.tlb diff --git a/Demo/Demo.dpr b/Demo/Demo.dpr index 8f3a643..61aa310 100644 --- a/Demo/Demo.dpr +++ b/Demo/Demo.dpr @@ -4,28 +4,19 @@ program Demo; {$R *.res} uses - System.SysUtils, Horse, Horse.Loggastic in '..\src\Horse.Loggastic.pas', Providers.Log in '..\src\Providers\Providers.Log.pas'; -var - App: THorse; - begin - App := THorse.Create; - try - //See output on https://ptsv2.com/t/39fiw-1573504844 - App.Use(Loggastic('https://ptsv2.com/t/39fiw-1573504844/post')); + //See output on https://ptsv2.com/t/39fiw-1573504844 + THorse.Use(Loggastic('https://ptsv2.com/t/39fiw-1573504844/post')); - App.Get('/', procedure(Req: THorseRequest; Res: THorseResponse; Next: TProc) + THorse.Get('/', + procedure(Res: THorseResponse) begin - Res.Send('Hello') + Res.Send('Hello'); end); - App.Start; - - finally - App.Free; - end; + THorse.Listen; end. diff --git a/Demo/Demo.dproj b/Demo/Demo.dproj index 0f8ebbe..3ed424b 100644 --- a/Demo/Demo.dproj +++ b/Demo/Demo.dproj @@ -1,7 +1,7 @@  {40B1F2E9-8D1B-4E15-B0B4-DA2D797F8465} - 18.8 + 19.4 None Demo.dpr True @@ -13,16 +13,36 @@ true + + true + Base + true + true Base true + + true + Base + true + true Base true + + true + Base + true + + + true + Base + true + true Base @@ -61,6 +81,12 @@ Demo modules\.dcp;modules\.dcu;modules;modules\horse\src;$(DCC_UnitSearchPath) + + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png + package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey= + Debug + annotation-1.2.0.dex.jar;asynclayoutinflater-1.0.0.dex.jar;billing-4.0.0.dex.jar;browser-1.0.0.dex.jar;cloud-messaging.dex.jar;collection-1.0.0.dex.jar;coordinatorlayout-1.0.0.dex.jar;core-1.5.0-rc02.dex.jar;core-common-2.0.1.dex.jar;core-runtime-2.0.1.dex.jar;cursoradapter-1.0.0.dex.jar;customview-1.0.0.dex.jar;documentfile-1.0.0.dex.jar;drawerlayout-1.0.0.dex.jar;firebase-annotations-16.0.0.dex.jar;firebase-common-20.0.0.dex.jar;firebase-components-17.0.0.dex.jar;firebase-datatransport-18.0.0.dex.jar;firebase-encoders-17.0.0.dex.jar;firebase-encoders-json-18.0.0.dex.jar;firebase-iid-interop-17.1.0.dex.jar;firebase-installations-17.0.0.dex.jar;firebase-installations-interop-17.0.0.dex.jar;firebase-measurement-connector-19.0.0.dex.jar;firebase-messaging-22.0.0.dex.jar;fmx.dex.jar;fragment-1.0.0.dex.jar;google-play-licensing.dex.jar;interpolator-1.0.0.dex.jar;javax.inject-1.dex.jar;legacy-support-core-ui-1.0.0.dex.jar;legacy-support-core-utils-1.0.0.dex.jar;lifecycle-common-2.0.0.dex.jar;lifecycle-livedata-2.0.0.dex.jar;lifecycle-livedata-core-2.0.0.dex.jar;lifecycle-runtime-2.0.0.dex.jar;lifecycle-service-2.0.0.dex.jar;lifecycle-viewmodel-2.0.0.dex.jar;listenablefuture-1.0.dex.jar;loader-1.0.0.dex.jar;localbroadcastmanager-1.0.0.dex.jar;play-services-ads-20.1.0.dex.jar;play-services-ads-base-20.1.0.dex.jar;play-services-ads-identifier-17.0.0.dex.jar;play-services-ads-lite-20.1.0.dex.jar;play-services-base-17.5.0.dex.jar;play-services-basement-17.6.0.dex.jar;play-services-cloud-messaging-16.0.0.dex.jar;play-services-drive-17.0.0.dex.jar;play-services-games-21.0.0.dex.jar;play-services-location-18.0.0.dex.jar;play-services-maps-17.0.1.dex.jar;play-services-measurement-base-18.0.0.dex.jar;play-services-measurement-sdk-api-18.0.0.dex.jar;play-services-places-placereport-17.0.0.dex.jar;play-services-stats-17.0.0.dex.jar;play-services-tasks-17.2.0.dex.jar;print-1.0.0.dex.jar;room-common-2.1.0.dex.jar;room-runtime-2.1.0.dex.jar;slidingpanelayout-1.0.0.dex.jar;sqlite-2.0.1.dex.jar;sqlite-framework-2.0.1.dex.jar;swiperefreshlayout-1.0.0.dex.jar;transport-api-3.0.0.dex.jar;transport-backend-cct-3.0.0.dex.jar;transport-runtime-3.0.0.dex.jar;user-messaging-platform-1.0.0.dex.jar;versionedparcelable-1.1.1.dex.jar;viewpager-1.0.0.dex.jar;work-runtime-2.1.0.dex.jar + true Base @@ -81,10 +107,27 @@ $(BDS)\bin\Artwork\Android\FM_NotificationIcon_72x72.png $(BDS)\bin\Artwork\Android\FM_NotificationIcon_96x96.png android-support-v4.dex.jar;cloud-messaging.dex.jar;com-google-android-gms.play-services-ads-base.17.2.0.dex.jar;com-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar;com-google-android-gms.play-services-ads-lite.17.2.0.dex.jar;com-google-android-gms.play-services-ads.17.2.0.dex.jar;com-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar;com-google-android-gms.play-services-analytics.16.0.8.dex.jar;com-google-android-gms.play-services-base.16.0.1.dex.jar;com-google-android-gms.play-services-basement.16.2.0.dex.jar;com-google-android-gms.play-services-gass.17.2.0.dex.jar;com-google-android-gms.play-services-identity.16.0.0.dex.jar;com-google-android-gms.play-services-maps.16.1.0.dex.jar;com-google-android-gms.play-services-measurement-base.16.4.0.dex.jar;com-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar;com-google-android-gms.play-services-stats.16.0.1.dex.jar;com-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar;com-google-android-gms.play-services-tasks.16.0.1.dex.jar;com-google-android-gms.play-services-wallet.16.0.1.dex.jar;com-google-firebase.firebase-analytics.16.4.0.dex.jar;com-google-firebase.firebase-common.16.1.0.dex.jar;com-google-firebase.firebase-iid-interop.16.0.1.dex.jar;com-google-firebase.firebase-iid.17.1.1.dex.jar;com-google-firebase.firebase-measurement-connector.17.0.1.dex.jar;com-google-firebase.firebase-messaging.17.5.0.dex.jar;fmx.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png + + + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_1024x1024.png + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;NSLocationAlwaysAndWhenInUseUsageDescription=The reason for accessing the location information of the user;UIBackgroundModes=;NSContactsUsageDescription=The reason for accessing the contacts;NSPhotoLibraryUsageDescription=The reason for accessing the photo library;NSPhotoLibraryAddUsageDescription=The reason for adding to the photo library;NSCameraUsageDescription=The reason for accessing the camera;NSFaceIDUsageDescription=The reason for accessing the face id;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSSiriUsageDescription=The reason for accessing Siri;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing bluetooth;NSBluetoothPeripheralUsageDescription=The reason for accessing bluetooth peripherals;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSMotionUsageDescription=The reason for accessing the accelerometer;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers + iPhoneAndiPad + true + Debug + $(MSBuildProjectName) RESTComponents;DataSnapServerMidas;emsclientfiredac;DataSnapFireDAC;FireDACADSDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;inetdb;emsedge;FireDACIBDriver;dbexpress;IndyCore;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;soapserver;bindengine;CloudService;FireDACOracleDriver;FireDACMySQLDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndySystem;FireDACDb2Driver;FireDACInfxDriver;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;FireDACASADriver;FireDACTDataDriver;soaprtl;DbxCommonDriver;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;rtl;emsserverresource;DbxClientDriver;CustomIPTransport;bindcomp;dbxcds;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;dbrtl;IndyProtocols;FireDACMongoDBDriver;$(DCC_UsePackage) + + CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSCameraUsageDescription=The reason for accessing the camera;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSMotionUsageDescription=The reason for accessing the accelerometer;NSDesktopFolderUsageDescription=The reason for accessing the Desktop folder;NSDocumentsFolderUsageDescription=The reason for accessing the Documents folder;NSDownloadsFolderUsageDescription=The reason for accessing the Downloads folder;NSNetworkVolumesUsageDescription=The reason for accessing files on a network volume;NSRemovableVolumesUsageDescription=The reason for accessing files on a removable volume;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers + Debug + + + CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSCameraUsageDescription=The reason for accessing the camera;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSMotionUsageDescription=The reason for accessing the accelerometer;NSDesktopFolderUsageDescription=The reason for accessing the Desktop folder;NSDocumentsFolderUsageDescription=The reason for accessing the Documents folder;NSDownloadsFolderUsageDescription=The reason for accessing the Downloads folder;NSNetworkVolumesUsageDescription=The reason for accessing files on a network volume;NSRemovableVolumesUsageDescription=The reason for accessing files on a removable volume;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers + Debug + DBXSqliteDriver;RESTComponents;DataSnapServerMidas;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;emsclientfiredac;tethering;svnui;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;horse_wizard;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;fmx;FireDACIBDriver;fmxdae;FireDACDBXDriver;dbexpress;IndyCore;boss_ide;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;FireDACASADriver;Player;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;emsserverresource;DbxClientDriver;RFindUnit;DBXSybaseASADriver;CustomIPTransport;vcldsnap;DOSCommandDR;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;fmxase;$(DCC_UsePackage) Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) @@ -124,10 +167,6 @@ - - Cfg_2 - Base - Base @@ -135,6 +174,10 @@ Cfg_1 Base + + Cfg_2 + Base + Delphi.Personality.12 @@ -146,11 +189,6 @@ - - - true - - true @@ -161,6 +199,11 @@ true + + + true + + Demo.exe @@ -179,6 +222,16 @@ 0 + + + classes + 64 + + + classes + 64 + + classes @@ -307,6 +360,16 @@ 1 + + + res\drawable-xxxhdpi + 1 + + + res\drawable-xxxhdpi + 1 + + res\drawable-ldpi @@ -470,6 +533,11 @@ 1 .framework + + Contents\MacOS + 1 + .framework + 0 @@ -497,6 +565,11 @@ 1 .dylib + + Contents\MacOS + 1 + .dylib + 0 .dll;.bpl @@ -525,6 +598,11 @@ 1 .dylib + + Contents\MacOS + 1 + .dylib + 0 .bpl @@ -554,10 +632,40 @@ Contents\Resources\StartUp\ 0 + + Contents\Resources\StartUp\ + 0 + 0 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + 1 @@ -657,6 +765,16 @@ 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + 1 @@ -668,6 +786,66 @@ 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + 1 @@ -767,6 +945,16 @@ 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + 1 @@ -778,6 +966,16 @@ 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + 1 @@ -822,6 +1020,86 @@ 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + 1 @@ -869,6 +1147,16 @@ 1 + + + ..\$(PROJECTNAME).launchscreen + 64 + + + ..\$(PROJECTNAME).launchscreen + 64 + + 1 @@ -885,6 +1173,10 @@ ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 1 + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + @@ -895,6 +1187,10 @@ ..\ 1 + + ..\ + 1 + @@ -905,6 +1201,10 @@ Contents 1 + + Contents + 1 + @@ -915,6 +1215,10 @@ Contents\Resources 1 + + Contents\Resources + 1 + @@ -945,6 +1249,10 @@ Contents\MacOS 1 + + Contents\MacOS + 1 + 0 @@ -983,20 +1291,25 @@ 1 - - + + + + - - - - + + + + False False + False False + False + False True False diff --git a/Demo/boss-lock.json b/Demo/boss-lock.json index 7a627e6..60b949c 100644 --- a/Demo/boss-lock.json +++ b/Demo/boss-lock.json @@ -1,11 +1,11 @@ { "hash": "d41d8cd98f00b204e9800998ecf8427e", - "updated": "2019-11-11T17:37:12.2273971-03:00", + "updated": "2023-01-31T22:31:07.4074165-03:00", "installedModules": { "github.com/hashload/horse": { "name": "horse", - "version": "1.7.0", - "hash": "7c3b15d6289c0ab49f483626c61da28b", + "version": "3.0.2", + "hash": "929cb417c573af469c997a7e1fda5dbb", "artifacts": {}, "failed": false, "changed": false diff --git a/Demo/boss.json b/Demo/boss.json index 51abad8..3c716e3 100644 --- a/Demo/boss.json +++ b/Demo/boss.json @@ -3,9 +3,9 @@ "description": "", "version": "1.0.0", "homepage": "", - "mainsrc": "./", + "mainsrc": "./src", "projects": [], "dependencies": { - "github.com/hashload/horse": "^1.6.8" + "github.com/hashload/horse": "^3.0.2" } } \ No newline at end of file diff --git a/Loggastic.dproj b/Loggastic.dproj index f5a973a..f63d008 100644 --- a/Loggastic.dproj +++ b/Loggastic.dproj @@ -2,7 +2,7 @@ {25716E81-564F-4824-AEEC-56C8FC4CC991} Loggastic.dpk - 18.7 + 19.4 None True Debug @@ -18,6 +18,26 @@ Base true + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + true Base @@ -52,12 +72,39 @@ System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) All Loggastic - $(DCC_UnitSearchPath);modules\.dcp;modules\.dcu;modules;modules\horse\src + modules\.dcp;modules\.dcu;modules;modules\horse\src;$(DCC_UnitSearchPath) true None android-support-v4.dex.jar;cloud-messaging.dex.jar;fmx.dex.jar;google-analytics-v2.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar;google-play-services-ads-7.0.0.dex.jar;google-play-services-analytics-7.0.0.dex.jar;google-play-services-base-7.0.0.dex.jar;google-play-services-gcm-7.0.0.dex.jar;google-play-services-identity-7.0.0.dex.jar;google-play-services-maps-7.0.0.dex.jar;google-play-services-panorama-7.0.0.dex.jar;google-play-services-plus-7.0.0.dex.jar;google-play-services-wallet-7.0.0.dex.jar + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png + + + package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey= + Debug + true + Base + true + None + android-support-v4.dex.jar;cloud-messaging.dex.jar;fmx.dex.jar;google-analytics-v2.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar;google-play-services-ads-7.0.0.dex.jar;google-play-services-analytics-7.0.0.dex.jar;google-play-services-base-7.0.0.dex.jar;google-play-services-gcm-7.0.0.dex.jar;google-play-services-identity-7.0.0.dex.jar;google-play-services-maps-7.0.0.dex.jar;google-play-services-panorama-7.0.0.dex.jar;google-play-services-plus-7.0.0.dex.jar;google-play-services-wallet-7.0.0.dex.jar + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png + + + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_1024x1024.png + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;NSLocationAlwaysAndWhenInUseUsageDescription=The reason for accessing the location information of the user;UIBackgroundModes=;NSContactsUsageDescription=The reason for accessing the contacts;NSPhotoLibraryUsageDescription=The reason for accessing the photo library;NSPhotoLibraryAddUsageDescription=The reason for adding to the photo library;NSCameraUsageDescription=The reason for accessing the camera;NSFaceIDUsageDescription=The reason for accessing the face id;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSSiriUsageDescription=The reason for accessing Siri;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing bluetooth;NSBluetoothPeripheralUsageDescription=The reason for accessing bluetooth peripherals;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSMotionUsageDescription=The reason for accessing the accelerometer;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers + iPhoneAndiPad + true + Debug + $(MSBuildProjectName) + + + CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSCameraUsageDescription=The reason for accessing the camera;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSMotionUsageDescription=The reason for accessing the accelerometer;NSDesktopFolderUsageDescription=The reason for accessing the Desktop folder;NSDocumentsFolderUsageDescription=The reason for accessing the Documents folder;NSDownloadsFolderUsageDescription=The reason for accessing the Downloads folder;NSNetworkVolumesUsageDescription=The reason for accessing files on a network volume;NSRemovableVolumesUsageDescription=The reason for accessing files on a removable volume;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers + Debug + + + CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSCameraUsageDescription=The reason for accessing the camera;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSMotionUsageDescription=The reason for accessing the accelerometer;NSDesktopFolderUsageDescription=The reason for accessing the Desktop folder;NSDocumentsFolderUsageDescription=The reason for accessing the Documents folder;NSDownloadsFolderUsageDescription=The reason for accessing the Downloads folder;NSNetworkVolumesUsageDescription=The reason for accessing files on a network volume;NSRemovableVolumesUsageDescription=The reason for accessing files on a removable volume;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers + Debug Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) @@ -92,10 +139,6 @@ - - Cfg_2 - Base - Base @@ -103,6 +146,10 @@ Cfg_1 Base + + Cfg_2 + Base + Delphi.Personality.12 @@ -121,16 +168,6 @@ - - - true - - - - - true - - true @@ -146,6 +183,16 @@ true + + + true + + + + + true + + Loggastic.bpl @@ -160,6 +207,16 @@ 0 + + + classes + 64 + + + classes + 64 + + classes @@ -171,6 +228,10 @@ res\xml 1 + + res\xml + 1 + @@ -183,138 +244,252 @@ library\lib\armeabi 1 + + library\lib\armeabi + 1 + + + + + library\lib\armeabi-v7a + 1 + library\lib\mips 1 + + library\lib\mips + 1 + library\lib\armeabi-v7a 1 + + library\lib\arm64-v8a + 1 + + + + + library\lib\armeabi-v7a + 1 + res\drawable 1 + + res\drawable + 1 + res\values 1 + + res\values + 1 + res\values-v21 1 + + res\values-v21 + 1 + res\values 1 + + res\values + 1 + res\drawable 1 + + res\drawable + 1 + res\drawable-xxhdpi 1 + + res\drawable-xxhdpi + 1 + + + + + res\drawable-xxxhdpi + 1 + + + res\drawable-xxxhdpi + 1 + res\drawable-ldpi 1 + + res\drawable-ldpi + 1 + res\drawable-mdpi 1 + + res\drawable-mdpi + 1 + res\drawable-hdpi 1 + + res\drawable-hdpi + 1 + res\drawable-xhdpi 1 + + res\drawable-xhdpi + 1 + res\drawable-mdpi 1 + + res\drawable-mdpi + 1 + res\drawable-hdpi 1 + + res\drawable-hdpi + 1 + res\drawable-xhdpi 1 + + res\drawable-xhdpi + 1 + res\drawable-xxhdpi 1 + + res\drawable-xxhdpi + 1 + res\drawable-xxxhdpi 1 + + res\drawable-xxxhdpi + 1 + res\drawable-small 1 + + res\drawable-small + 1 + res\drawable-normal 1 + + res\drawable-normal + 1 + res\drawable-large 1 + + res\drawable-large + 1 + res\drawable-xlarge 1 + + res\drawable-xlarge + 1 + res\values 1 + + res\values + 1 + @@ -336,6 +511,10 @@ 1 .framework + + 1 + .framework + 0 @@ -349,6 +528,10 @@ 1 .dylib + + 1 + .dylib + 0 .dll;.bpl @@ -375,6 +558,10 @@ 1 .dylib + + 1 + .dylib + 0 .bpl @@ -384,6 +571,9 @@ 0 + + 0 + 0 @@ -399,10 +589,39 @@ 0 + + 0 + 0 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + 1 @@ -535,6 +754,16 @@ 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + 1 @@ -557,6 +786,66 @@ 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + 1 @@ -656,6 +945,16 @@ 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + 1 @@ -667,6 +966,16 @@ 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + 1 @@ -711,10 +1020,93 @@ 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + 1 + + 1 + @@ -729,6 +1121,7 @@ + 1 @@ -752,12 +1145,20 @@ Contents\Resources 1 + + Contents\Resources + 1 + library\lib\armeabi-v7a 1 + + library\lib\arm64-v8a + 1 + 1 @@ -776,10 +1177,19 @@ 1 + + 1 + 0 + + + library\lib\armeabi-v7a + 1 + + 1 @@ -808,19 +1218,25 @@ 1 - - + + + + - - - + + + False + False + False False + False + False True False diff --git a/Loggastic.res b/Loggastic.res deleted file mode 100644 index 799aff9fbc30cb4023ceb9225d737b7909c72fd0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 640 zcmZ{iK~KU!5QSe!55mc_Cl8)YP4;3!Vn|R!f=aOAs#q#%0>xDPdHx&k{sZybsVjx( zl3j+G_uf8cR+5g{n@zn5cULRa55YuMOVo~kK`lo((Y+oxFEu6_=uWr%9&la}`}H1w zeo3BRYlQC$t4dxlRDM!=BoU#vR;5Cv=BO1~C`Y-}vsM7RhDqd<=$!5F;2m|L(D6dtawZviH^fPix zusP=wm5LjtnwjQ`{9pGw^Iq%C^af*1C%tO^uV-hTcRBmc_kDYZ5mWQ7LZ`N!l}>Cb wsr{pp4lF=6d)JOXVx9-R_HU;{2Zrh?wV97~L)7CvTr-iBDb}m`cKp1*0bcf2KL7v# diff --git a/boss-lock.json b/boss-lock.json index 85a5325..2ad76b2 100644 --- a/boss-lock.json +++ b/boss-lock.json @@ -1,11 +1,11 @@ { - "hash": "8368f70e5346a12a93a069a04324d392", - "updated": "2019-11-11T17:31:43.7062285-03:00", + "hash": "d41d8cd98f00b204e9800998ecf8427e", + "updated": "2023-01-31T22:19:01.1604569-03:00", "installedModules": { "github.com/hashload/horse": { "name": "horse", - "version": "1.7.0", - "hash": "7c3b15d6289c0ab49f483626c61da28b", + "version": "3.0.2", + "hash": "929cb417c573af469c997a7e1fda5dbb", "artifacts": {}, "failed": false, "changed": false diff --git a/boss.json b/boss.json index ce6caa2..eb54628 100644 --- a/boss.json +++ b/boss.json @@ -1,11 +1,11 @@ { - "name": "Loggastic", + "name": "loggastic", "description": "", "version": "1.0.0", "homepage": "", - "mainsrc": "src/", + "mainsrc": "./src", "projects": [], "dependencies": { - "github.com/HashLoad/horse": "^v1.6.3" + "github.com/hashload/horse": "^3.0.2" } } \ No newline at end of file diff --git a/src/Horse.Loggastic.pas b/src/Horse.Loggastic.pas index 853edd2..818f6fe 100644 --- a/src/Horse.Loggastic.pas +++ b/src/Horse.Loggastic.pas @@ -2,15 +2,13 @@ interface -uses - Horse, Providers.Log; +uses Horse, Providers.Log; function Loggastic(AElasticSearchUrl: string): THorseCallback; implementation -uses - System.SysUtils; +uses System.SysUtils; function Loggastic(AElasticSearchUrl: string): THorseCallback; begin diff --git a/src/Providers/Providers.Log.pas b/src/Providers/Providers.Log.pas index ed725aa..686acf1 100644 --- a/src/Providers/Providers.Log.pas +++ b/src/Providers/Providers.Log.pas @@ -2,33 +2,31 @@ interface -uses - System.JSON, REST.JSON, System.Net.HTTPClientComponent, System.Threading, System.SysUtils, System.DateUtils, Horse, +uses System.JSON, REST.JSON, System.Net.HTTPClientComponent, System.Threading, System.SysUtils, System.DateUtils, Horse, REST.Client, REST.Types, System.Generics.Collections; const DATE_HEADER = '_@DATE'; + type TProviderLogResponse = class private FBody: string; FDate: TDateTime; FReasonString: string; - FStatusCode: integer; + FStatusCode: Integer; FContentType: string; - FContentLength: integer; + FContentLength: Integer; public property Date: TDateTime read FDate write FDate; property ReasonString: string read FReasonString write FReasonString; - property StatusCode: integer read FStatusCode write FStatusCode; + property StatusCode: Integer read FStatusCode write FStatusCode; property ContentType: string read FContentType write FContentType; - property ContentLength: integer read FContentLength write FContentLength; + property ContentLength: Integer read FContentLength write FContentLength; property Body: string read FBody write FBody; - function ToJSON: TJSONObject; - constructor Create(const AResponse: THorseResponse); overload; - constructor Create(AStatusCode: integer; AError, ADescription: string); overload; + constructor Create(AStatusCode: Integer; AError, ADescription: string); overload; end; TProviderLogRequest = class @@ -38,19 +36,16 @@ TProviderLogRequest = class FContentType: string; FParams: TJSONObject; FBody: string; - FContentLength: integer; - + FContentLength: Integer; function DictionaryToJsonObject(ADictionary: TDictionary): TJSONObject; public property Date: TDateTime read FDate write FDate; property Method: string read FMethod write FMethod; property ContentType: string read FContentType write FContentType; - property ContentLength: integer read FContentLength write FContentLength; + property ContentLength: Integer read FContentLength write FContentLength; property Params: TJSONObject read FParams write FParams; property Body: string read FBody write FBody; - function ToJSON: TJSONObject; - constructor Create(const ARequest: THorseRequest; AStartDate: TDateTime); end; @@ -60,7 +55,6 @@ TProviderLogGeneral = class FServerHost: string; FPathInfo: string; FSession: TJSONObject; - procedure SetSession(const ARequest: THorseRequest); public property BasePath: string read FBasePath write FBasePath; @@ -68,7 +62,6 @@ TProviderLogGeneral = class property PathInfo: string read FPathInfo write FPathInfo; property Session: TJSONObject read FSession write FSession; function ToJSON: TJSONObject; - constructor Create(const ARequest: THorseRequest); end; @@ -85,23 +78,19 @@ TProviderLog = class property General: TProviderLogGeneral read FGeneral write FGeneral; property Request: TProviderLogRequest read FRequest write FRequest; property Response: TProviderLogResponse read FResponse write FResponse; - procedure SendLog; function ToJSON: TJSONObject; - constructor Create(const ARequest: THorseRequest; const AResponse: THorseResponse; AStartDate: TDateTime); overload; constructor Create(const ARequest: THorseRequest; const AResponse: THorseResponse; AError: string; AStartDate: TDateTime); overload; destructor Destroy; override; end; procedure Log(const ARequest: THorseRequest; const AResponse: THorseResponse; AStartDate: TDateTime); overload; - procedure Log(const ARequest: THorseRequest; const AResponse: THorseResponse; AError: string; AStartDate: TDateTime); overload; implementation -uses System.NetEncoding, System.Classes, IdHTTPWebBrokerBridge, - IdHTTPHeaderInfo; +uses System.NetEncoding, System.Classes, IdHTTPWebBrokerBridge, IdHTTPHeaderInfo; type TIdHTTPAppRequestHelper = class helper for TIdHTTPAppRequest @@ -110,7 +99,6 @@ TIdHTTPAppRequestHelper = class helper for TIdHTTPAppRequest function GetHeadersJSON: TJSONObject; end; - procedure Log(const ARequest: THorseRequest; const AResponse: THorseResponse; AStartDate: TDateTime); var LLog: TProviderLog; @@ -148,8 +136,7 @@ constructor TProviderLog.Create(const ARequest: THorseRequest; const AResponse: begin FGeneral := TProviderLogGeneral.Create(ARequest); FRequest := TProviderLogRequest.Create(ARequest, AStartDate); - FResponse := TProviderLogResponse.Create(AResponse.Status, AError, THorseHackResponse(AResponse) - .GetWebResponse.Content); + FResponse := TProviderLogResponse.Create(AResponse.Status, AError, AResponse.RawWebResponse.Content); end; destructor TProviderLog.Destroy; @@ -203,6 +190,7 @@ procedure TProviderLog.SendLog; except end; end); + LTask.Start; end; @@ -215,10 +203,10 @@ function TProviderLog.ToJSON: TJSONObject; end; procedure TProviderLogGeneral.SetSession(const ARequest: THorseRequest); -var - LPayloadEncoded, LPayloadDecoded, LToken: string; const JWT_PAYLOAD = 1; +var + LPayloadEncoded, LPayloadDecoded, LToken: string; begin LToken := ARequest.Headers['X-Authorization']; @@ -245,36 +233,30 @@ function TProviderLogGeneral.ToJSON: TJSONObject; { TProviderLogGeneral } constructor TProviderLogGeneral.Create(const ARequest: THorseRequest); -var - LHostRequest: THorseHackRequest; begin - LHostRequest := THorseHackRequest(ARequest); - FBasePath := LHostRequest.GetWebRequest.PathInfo; - FServerHost := LHostRequest.GetWebRequest.Host; - FPathInfo := LHostRequest.GetWebRequest.PathInfo; + FServerHost := ARequest.RawWebRequest.Host; + FBasePath := ARequest.RawWebRequest.PathInfo; + FPathInfo := ARequest.RawWebRequest.PathInfo; SetSession(ARequest); end; { TProviderLogRequest } constructor TProviderLogRequest.Create(const ARequest: THorseRequest; AStartDate: TDateTime); -var - LHackedRequest: THorseHackRequest; begin FDate := AStartDate; - FMethod := THorseHackRequest(ARequest).GetWebRequest.Method; - FContentType := THorseHackRequest(ARequest).GetWebRequest.ContentType; - LHackedRequest := THorseHackRequest(ARequest); + FMethod := ARequest.RawWebRequest.Method; + FContentType := ARequest.RawWebRequest.ContentType; FParams := TJSONObject.Create; - FParams.AddPair('querys', DictionaryToJsonObject(ARequest.Query)); - FParams.AddPair('params', DictionaryToJsonObject(ARequest.Params)); - if LHackedRequest.GetWebRequest.inheritsfrom(TIdHTTPAppRequest) then - begin - FParams.AddPair('headers', TIdHTTPAppRequest(LHackedRequest.GetWebRequest).GetHeadersJSON); - end; + FParams.AddPair('querys', DictionaryToJsonObject(ARequest.Query.Dictionary)); + FParams.AddPair('params', DictionaryToJsonObject(ARequest.Params.Dictionary)); + + if ARequest.RawWebRequest.InheritsFrom(TIdHTTPAppRequest) then + FParams.AddPair('headers', TIdHTTPAppRequest(ARequest.RawWebRequest).GetHeadersJSON); + if FContentType = 'application/json' then - FBody := THorseHackRequest(ARequest).Body; + FBody := ARequest.Body; FContentLength := FBody.Length; end; @@ -285,9 +267,7 @@ function TProviderLogRequest.DictionaryToJsonObject(ADictionary: TDictionary