import requests
import io


def _resp(text=''):
    """Construct a response with plain text"""
    resp = requests.Response()
    resp.status_code = 200
    resp.encoding = 'utf8'
    resp.raw = io.BytesIO(text.encode('utf8'))
    return resp