passing block to to_return()
only call response_body once to avoid triggering block multiple times