Hi,
I'm trying to update to v0.9.91.
If we use template literals in fetch, a conversion to JSON fails:
fetch `/api?${#form as Values | FormEncoded}` as JSON
fails with "Uncaught SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data"
Same for
set params to 'study_id=163017051' fetch `/api?${params}` as JSON
explicitely putting the form data as string
fetch /api?study_id=163017051 as JSON
works.
Since
fetch `/api?${#form as Values | FormEncoded}` as Text
fails with "Uncaught Error: Unknown conversion : Text", my suspicion is, that the internal output of #form as Values | FormEncoded is fed to the external conversion.
Am I doing something wrong?
Best regards
Philipp
Hi,
I'm trying to update to v0.9.91.
If we use template literals in fetch, a conversion to JSON fails:
fails with "Uncaught SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data"
Same for
explicitely putting the form data as string
works.
Since
fails with "Uncaught Error: Unknown conversion : Text", my suspicion is, that the internal output of
#form as Values | FormEncodedis fed to the external conversion.Am I doing something wrong?
Best regards
Philipp