Skip to content

Commit fb34b12

Browse files
authored
110 in rest mode provide mechanism to allow response to failed request to return a normal payload (#111)
* Add RESTFailProcessing setting * Bump version number
1 parent 9249e82 commit fb34b12

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Source/Jarvis.dyalog

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
rVersion
88
:Access public shared
9-
r'Jarvis' '1.21.2' '2025-11-04'
9+
r'Jarvis' '1.22.0' '2026-01-08'
1010
1111

1212
Documentation
@@ -59,6 +59,7 @@
5959

6060
REST mode settings
6161
:Field Public ParsePayload1 1=parse request payload based on content-type header (REST only)
62+
:Field Public RESTFailProcessing0 0 - don't do anything on failed request, 1 - process response payload as "normal"
6263
:Field Public RESTMethods'Get,Post,Put,Delete,Patch,Options'
6364

6465
CORS settings
@@ -1312,7 +1313,7 @@
13121313
{}{1(85)'PostProcess ⍵'}ns.Req call postprocessing
13131314
:EndTrap
13141315

1315-
0 If 20.01×ns.Req.Response.Status
1316+
0 If (0=RESTFailProcessing)20.01×ns.Req.Response.Status
13161317
:If (ns.Req.(Response.Headers GetHeader'content-type')'')~0DefaultContentType
13171318
'content-type'ns.Req.SetHeader DefaultContentType
13181319
:EndIf

0 commit comments

Comments
 (0)