Skip to content

Commit

Permalink
Added mtPatch
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciussanchez committed Jun 22, 2021
1 parent de90909 commit e13434c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions boss-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"installedModules": {
"github.com/hashload/horse": {
"name": "horse",
"version": "2.0.8",
"hash": "f0d9be7d8b5059a6e99397562d39306c",
"version": "2.0.13",
"hash": "32daa5a81f115ecc285cbbbbdbcddcea",
"artifacts": {},
"failed": false,
"changed": false
Expand Down
2 changes: 1 addition & 1 deletion samples/delphi/Samples.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<DCC_K>false</DCC_K>
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)</DCC_Namespace>
<SanitizedProjectName>Samples</SanitizedProjectName>
<DCC_UnitSearchPath>modules\.dcp;modules\.dcu;modules;modules\horse\src;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
<DCC_UnitSearchPath>$(DCC_UnitSearchPath);modules\.dcp;modules\.dcu;modules;modules\horse\src</DCC_UnitSearchPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_UsePackage>DBXSqliteDriver;IndyIPCommon;RESTComponents;bindcompdbx;DBXInterBaseDriver;vcl;IndyIPServer;vclactnband;vclFireDAC;IndySystem;tethering;svnui;dsnapcon;FireDACADSDriver;FireDACMSAccDriver;fmxFireDAC;vclimg;FireDAC;vcltouch;vcldb;bindcompfmx;svn;FireDACSqliteDriver;FireDACPgDriver;inetdb;soaprtl;DbxCommonDriver;fmx;FireDACIBDriver;fmxdae;xmlrtl;soapmidas;fmxobj;vclwinx;rtl;DbxClientDriver;CustomIPTransport;vcldsnap;dbexpress;IndyCore;vclx;bindcomp;appanalytics;dsnap;FireDACCommon;IndyIPClient;bindcompvcl;RESTBackendComponents;VCLRESTComponents;soapserver;dbxcds;VclSmp;adortl;vclie;bindengine;DBXMySQLDriver;CloudService;dsnapxml;FireDACMySQLDriver;dbrtl;IndyProtocols;inetdbxpress;FireDACCommonODBC;FireDACCommonDriver;inet;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
Expand Down
4 changes: 2 additions & 2 deletions samples/delphi/boss-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"installedModules": {
"github.com/hashload/horse": {
"name": "horse",
"version": "2.0.8",
"hash": "f0d9be7d8b5059a6e99397562d39306c",
"version": "2.0.13",
"hash": "985da2054d3c705bc211797c653e47ba",
"artifacts": {},
"failed": false,
"changed": false
Expand Down
4 changes: 2 additions & 2 deletions samples/lazarus/boss-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"installedModules": {
"github.com/hashload/horse": {
"name": "horse",
"version": "2.0.8",
"hash": "f0d9be7d8b5059a6e99397562d39306c",
"version": "2.0.13",
"hash": "985da2054d3c705bc211797c653e47ba",
"artifacts": {},
"failed": false,
"changed": false
Expand Down
2 changes: 1 addition & 1 deletion src/Horse.Jhonson.pas
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ procedure Middleware(Req: THorseRequest; Res: THorseResponse; Next: {$IF DEFINED
LJSON: {$IF DEFINED(FPC)}TJsonData{$ELSE}TJSONValue{$ENDIF};
begin
if ({$IF DEFINED(FPC)} StringCommandToMethodType(Req.RawWebRequest.Method)
{$ELSE} Req.RawWebRequest.MethodType{$ENDIF} in [mtPost, mtPut]) and (Req.RawWebRequest.ContentType = 'application/json') then
{$ELSE} Req.RawWebRequest.MethodType{$ENDIF} in [mtPost, mtPut, mtPatch]) and (Req.RawWebRequest.ContentType = 'application/json') then
begin
LJSON := {$IF DEFINED(FPC)} GetJSON(Req.Body) {$ELSE}TJSONObject.ParseJSONValue(Req.Body){$ENDIF};
Req.Body(LJSON);
Expand Down

0 comments on commit e13434c

Please sign in to comment.