'Shortcut to get the parsed results while following redirects'

def get_resp(self, url, data=None, follow_redirects=True, raise_on_error=True):

    if data:
        resp = self.client.post(url, data=data, follow_redirects=follow_redirects)
    else:
        resp = self.client.get(url, follow_redirects=follow_redirects)
    if (raise_on_error and (resp.status_code > 400)):
        raise Exception(u'http    request    failed    with    code    {}'.format(resp.status_code))
    return resp.data.decode(u'utf-8')
