Hello estegemoller,
I also found it very difficult/confusing until I discovered the VS Code REST editor.
Here are the (slightly edited) Powershell commands generated by VS Code:
$headers=@{}
$headers.Add("user-agent", "vscode-restclient")
$headers.Add("content-type", "application/json")
$body='{"command": "ls", "arg": ["./testfolder", "--max-depth=1"]}'
Invoke-WebRequest -Uri 'http://127.0.0.1:5572/core/command' -Method POST -Headers $headers -ContentType 'application/json' -Body $body
based on this request:
POST http://127.0.0.1:5572/core/command HTTP/1.1
content-type: application/json
{
"command": "ls",
"arg": [
"./testfolder",
"--max-depth=1"
]
}
I replaced "GDriveTest:" by "./testfolder" and added "--max-depth=1" to better illustrate the arg list.
The above Powershell commands works fine for me, I think the important points are to add -ContentType and to send "arg" as a list.
Tip: Start rclone rcd
with -vv and watch the output, it sometimes helps the troubleshooting.