Skip to content

Commit 71a89b2

Browse files
authored
Create command synonym (#62)
* Address #59 - improved multipart/forn-data handling * Update content-types.md * Implement Command/Method synonyms Fixes #61
1 parent 311cafe commit 71a89b2

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

apl-package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919
source: "source/HttpCommand.dyalog",
2020
tags: "mac-os,windows,linux,http,dyalog,pi",
2121
userCommandScript: "",
22-
version: "5.9.1",
22+
version: "5.9.2",
2323
}

source/HttpCommand.dyalog

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
rVersion
88
Return the current version
99
:Access public shared
10-
r'HttpCommand' '5.9.1' '2025-03-08'
10+
r'HttpCommand' '5.9.2' '2025-06-21'
1111
1212

1313
Request-related fields
1414
:field public Command'get' HTTP command (method)
15+
:field public Method'get' synonym for Command
1516
:field public URL'' requested resource
1617
:field public Params'' request parameters
1718
:field public Headers0 2'' request headers - name, value
@@ -62,6 +63,18 @@
6263
:field ConxProps'' when a client is made, its connection properties are saved so that if either changes, we close the previous client
6364
:field origCert¯1 used to check if Cert changed between calls
6465

66+
UpdateCommandMethod arg
67+
keeps Command and its alias Method in sync
68+
:Implements Trigger Command,Method
69+
:If (Command Method).arg.NewValue
70+
:If 'Command'arg.Name
71+
Methodarg.NewValue
72+
:Else
73+
Commandarg.NewValue
74+
:EndIf
75+
:EndIf
76+
77+
6578
make
6679
No argument constructor
6780
:Access public
@@ -174,9 +187,9 @@
174187
r''
175188
:Trap Debug0
176189
:If 0args
177-
r##.⎕NEW ⎕THIS
190+
r##.⎕NEW⊃⊃⎕CLASS ⎕THIS
178191
:Else
179-
r##.⎕NEW ⎕THIS(eis(9.1nameClassargs)args)
192+
r##.⎕NEW(⊃⊃⎕CLASS ⎕THIS)(eis(9.1nameClassargs)args)
180193
:EndIf
181194
r.RequestOnlyrequestOnly
182195
:Else

0 commit comments

Comments
 (0)