Modifying response in script

Hi, everybody! I want to modify response, but it’s not working.
I use command line:
--replace :~q:'A':'O'
It’s not working. I want to use script, like an “”, but I have some questions. How I can to change response text? Does this method exist? "flow.response.text = "

I find this

A models.HTTPFlow object. At this point, the flow is guaranteed to have a non-none request and response attributes. The raw response body will be in response.body, unless response streaming has been enabled.

But I need in help. How I can to modify response.body?I want replace all ‘A’ to ‘O’.
What I must to do? I know that serverresponse is a string without html tags. But this not working:(
myresponse = flow.response.body

flow.response.body = myresponse

I am able to modify reponse send back to client in my script: you can try to add this in the response function
flow.response.replace("A", "O")