Describe the bug
string assigned to variable leads to: Get Contents of URL failed because Shortcuts couldn't convert from Rich text to URL.
Assignment of url to cmsURL, then used in downloadURL(url: cmsURL,... generates a "Get Contents of URL failed because Shortcuts couldn't convert from Rich text to URL." error
Import Shortcuts
//
dictionary() >> header
setValue(key: Content-Type, value: "application/json; charset=UTF-8", dictionary: header) >> header
//
var cmsURL = "https://jsonplaceholder.typicode.com/posts"
//
dictionary() >> reqDict
setValue(key:title, value: "My First Post", dictionary: reqDict) >> reqDict
setValue(key:body, value: "0.9", dictionary: reqDict) >> reqDict
setValue(key:userId, value:1, dictionary: reqDict) >> reqDict
//
downloadURL(
url: cmsURL,
method: POST,
headers: header,
requestType: Json,
requestJSON: reqDict,
requestVar: response) >> response
//
quicklook(input: response)
Working code with direct use of string:
import Shortcuts
//
dictionary() >> header
setValue(key: Content-Type, value: "application/json; charset=UTF-8", dictionary: header) >> header
//
dictionary() >> reqDict
setValue(key:title, value: "My First Post", dictionary: reqDict) >> reqDict
setValue(key:body, value: "0.9", dictionary: reqDict) >> reqDict
setValue(key:userId, value:1, dictionary: reqDict) >> reqDict
//
downloadURL(
url: "https://jsonplaceholder.typicode.com/posts",
method: POST,
headers: header,
requestType: Json,
requestJSON: reqDict,
requestVar: response) >> response
//
quicklook(input: response)
To Reproduce
Steps to reproduce the behavior:
- paste the code above into a.jelly
- run the command jelly a.jelly --export --out u_a.shortcut
- run the command shortcuts sign --mode anyone --input u_a.shortcut --output a.shortcut
- run the command open -a Shortcuts a.shortcut
- click the "Add Shortcut" button
- click to select the a Shortcut in Shortcuts
- click to open the selected shortcut
- run the shortcut with play icon on top right of shortcut
- observe "Get Contents of URL failed because Shortcuts couldn't convert from Rich text to URL." error message
Expected behavior
Should preform the same as the second code snippet which runs without error
Screenshots
If applicable, add screenshots to help explain your problem.
Information
- Device: [macBook Pro, 14-inch, 2021]
- OS: [Sonoma 14.5]
- Jellycuts Version [??? jelly command does not provide version info (/opt/homebrew/bin/jelly)]
- Jailbroken? [No]
Additional context
Add any other context about the problem here.
Describe the bug
string assigned to variable leads to: Get Contents of URL failed because Shortcuts couldn't convert from Rich text to URL.
Assignment of url to cmsURL, then used in downloadURL(url: cmsURL,... generates a "Get Contents of URL failed because Shortcuts couldn't convert from Rich text to URL." error
Import Shortcuts
//
dictionary() >> header
setValue(key: Content-Type, value: "application/json; charset=UTF-8", dictionary: header) >> header
//
var cmsURL = "https://jsonplaceholder.typicode.com/posts"
//
dictionary() >> reqDict
setValue(key:title, value: "My First Post", dictionary: reqDict) >> reqDict
setValue(key:body, value: "0.9", dictionary: reqDict) >> reqDict
setValue(key:userId, value:1, dictionary: reqDict) >> reqDict
//
downloadURL(
url: cmsURL,
method: POST,
headers: header,
requestType: Json,
requestJSON: reqDict,
requestVar: response) >> response
//
quicklook(input: response)
Working code with direct use of string:
import Shortcuts
//
dictionary() >> header
setValue(key: Content-Type, value: "application/json; charset=UTF-8", dictionary: header) >> header
//
dictionary() >> reqDict
setValue(key:title, value: "My First Post", dictionary: reqDict) >> reqDict
setValue(key:body, value: "0.9", dictionary: reqDict) >> reqDict
setValue(key:userId, value:1, dictionary: reqDict) >> reqDict
//
downloadURL(
url: "https://jsonplaceholder.typicode.com/posts",
method: POST,
headers: header,
requestType: Json,
requestJSON: reqDict,
requestVar: response) >> response
//
quicklook(input: response)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should preform the same as the second code snippet which runs without error
Screenshots
If applicable, add screenshots to help explain your problem.
Information
Additional context
Add any other context about the problem here.