+1
Any idea why I can't assign to a datasource source?
I'm working on an app that uses Parse and I'm trying to query for the first time. I've got everything working with Postman (Chrome plug-in for HTTP requests) and it's pretty straightforward. Header is correct and in place (I use it for every other datasource). The request itself is just a URL parameter like this: BASEURL?where={"userid":"XXXXX"} I've narrowed my issue down to a very specific piece of code:
My first alert looks perfect. It shows the exact URL I want to send. My second alert is blank, so I'm guessing it's not writing to the datasource source for some reason.
I'd assumed it might be the curly braces, so I replaced them with the HTML entities { and } but it's still not working. Any idea?
<action name="oninit" oninit="yes">
<assign property="var:url" value="https://api.parse.com/1/classes/data?where={"userid":"cB93EZSEzN"}" />
<alert message="VAR: [var:url]" />
<assign property="datasource:parsecheckdata.source" value="[var:url]" />
<alert message="DS: [datasource:parsecheckdata.source]" />
</action>
My first alert looks perfect. It shows the exact URL I want to send. My second alert is blank, so I'm guessing it's not writing to the datasource source for some reason.
I'd assumed it might be the curly braces, so I replaced them with the HTML entities { and } but it's still not working. Any idea?
Service d'assistance aux clients par UserEcho
<action name="oninit" oninit="yes">
<sync>
<assign property="var:params" value="where={"userid":"cB93EZSEzN"}" encoding="url"/>
<assign property="datasource:parsecheckpets.source" value="https://api.parse.com/1/classes/pets?[var:params]" />
</sync>
</action>
The important thing here is the encoding. Parse wants the parameters URL-encoded. However, you don't want to encode the entire URL (http:// and all), because that breaks things.