Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apl-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
19 changes: 16 additions & 3 deletions source/HttpCommand.dyalog
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down