diff --git a/apl-package.json b/apl-package.json index 2affa34..010189e 100644 --- a/apl-package.json +++ b/apl-package.json @@ -19,5 +19,5 @@ source: "source/HttpCommand.dyalog", tags: "mac-os,windows,linux,http,dyalog,pi", userCommandScript: "", - version: "5.9.1", + version: "5.9.2", } diff --git a/source/HttpCommand.dyalog b/source/HttpCommand.dyalog index 1f07ac2..81399c5 100644 --- a/source/HttpCommand.dyalog +++ b/source/HttpCommand.dyalog @@ -7,11 +7,12 @@ ∇ r←Version ⍝ Return the current version :Access public shared - r←'HttpCommand' '5.9.1' '2025-03-08' + r←'HttpCommand' '5.9.2' '2025-06-21' ∇ ⍝ Request-related fields :field public Command←'get' ⍝ HTTP command (method) + :field public Method←'get' ⍝ synonym for Command :field public URL←'' ⍝ requested resource :field public Params←'' ⍝ request parameters :field public Headers←0 2⍴⊂'' ⍝ request headers - name, value @@ -62,6 +63,18 @@ :field ConxProps←'' ⍝ when a client is made, its connection properties are saved so that if either changes, we close the previous client :field origCert←¯1 ⍝ used to check if Cert changed between calls + ∇ UpdateCommandMethod arg + ⍝ keeps Command and its alias Method in sync + :Implements Trigger Command,Method + :If (Command Method)∨.≢⊂arg.NewValue + :If 'Command'≡arg.Name + Method←arg.NewValue + :Else + Command←arg.NewValue + :EndIf + :EndIf + ∇ + ∇ make ⍝ No argument constructor :Access public @@ -174,9 +187,9 @@ r←'' :Trap Debug↓0 :If 0∊⍴args - r←##.⎕NEW ⎕THIS + r←##.⎕NEW⊃⊃⎕CLASS ⎕THIS :Else - r←##.⎕NEW ⎕THIS(eis⍣(9.1≠nameClass⊃args)⊢args) + r←##.⎕NEW(⊃⊃⎕CLASS ⎕THIS)(eis⍣(9.1≠nameClass⊃args)⊢args) :EndIf r.RequestOnly←requestOnly :Else