Thanks Meredydd
this:
The good news is that
anvil.http.request()
returns aMedia
object already! So you can just pass yourresponse
value into your server function, without callingget_bytes()
on it – and then you can callget_bytes()
to get the contents in your server function
is indeed the solution to my case.
I still don’t understand why the attempt (see cloned app) to convert the decoding in utf-8 gives error:
csv_string_QIS = response.get_bytes().decode('utf-8')
UnicodeEncodeError: UTF-8 decoding failed
Thanks!