For Flutter apps, I use JsonServiceClient.globalRequestFilter to set the user-agent header. A recent change to the ServiceStack client lib has moved the call to req.write(bodyStr)before the filters are called. It used to be after. I now get an error saying the request headers are immutable.
The Flutter documentation for the write method states:
The client request headers can be modified until the client request body is written to or closed. After that they become immutable.
For Flutter apps, I use
JsonServiceClient.globalRequestFilter
to set the user-agent header. A recent change to the ServiceStack client lib has moved the call toreq.write(bodyStr)
before the filters are called. It used to be after. I now get an error saying the request headers are immutable.The Flutter documentation for the
write
method states: