Prepare response before send