edit - I have edited this down to be more succinct.
If I do this in an http endpoint -
return anvil.server.HttpResponse(201,"OK")
I get this in my app log -
Incoming API request from Zurich, Switzerland.
TypeError: list indices must be integers or slices, not str at /downlink/anvil/_server.py, line 1130called from /downlink/anvil/_server.py, line 1176
It gives me no idea where in the server function the error occurs, I worked it out through trial and error.
What am I doing wrong?
I’ve worked around it by doing this, which I believe equates to the same thing -
return "HTTP/1.1 201 Created\n\n"