Hi,
I have a new requirement such that, I need to send the field name to my backend.
\procedure completion()
\procedure errorHandler()
<$list filter="[<status>match[200]]" emptyMessage=<<errorHandler>>>
<$action-setfield $tiddler="postjsonresponsedata" text=<<data>>/>
</$list>
\end completion
\procedure fetchDataAPI()
<$action-sendmessage
$message="tm-http-request"
url="http://localhost:3000/submit"
method="POST"
body='{"foo": [[tiddlername]get[fieldname]]}'
oncompletion=<<completion>>
onprogress=<<progress>>
/>
<$let data={{{ [[data]get[text]] }}}>
<<tiddlerize>>
</$let>
\end
<$button actions=<<fetchDataAPI>>>Fetch data </$button>
,
I have tried body='{"foo": [[tiddlername]get[fieldname]]}'
, this way to send the value of the field to the backend, but I’m receiving it as: Data received: { '{"foo": [': { Prozessbegleiter: { _uvar_local_status: '' } } }
.
How can I send the value of a tiddler to the backend?
Can anyone please guide me on this?
Thanks,