Hello jshaffstall
Thank you for directing me to this topic. It helped me understand how to deal with HTTP on the Anvil website, but unfortunately the code
@anvil.server.http_endpoint('/tasks')
def get_tasks(**q):
return [{'title': task['title'], 'done': task['done']}
for task in app_tables.tasks.search()]
When I use curl I don’t get the same result mentioned in the topic.
$ curl https://my-todo-list.anvil.app/_/api/tasks
[{"done":true,"title":"Wash the car"},{"done":true,"title":"Do the dishes"}]
So I stopped here after several failed attempts, the details of which I cannot mention because that would make the post very long.
I don’t need to return anything to Roblox. All I need is this:
When I convert the words I want to send from the Lua code in Roblox from text to JSON, here in Anvil, I want to do the opposite. I convert them from JSON to text. If I have to write anything in the code to process the data before converting, that’s fine. I want to get the text I sent.