'This is the body of the request we send across. This is never actually
used in the code, but exists for debugging purposes -- you can call
`print attempt.request_message_txt()` on the console and get a readable
rendering of the request that would be sent across, without actually
sending anything.'

def request_message_txt(self):

    (headers, body) = self.create_request()
    header_txt = '\n'.join(('{}:    {}'.format(h, v) for (h, v) in sorted(headers.items())))
    body_txt = json.dumps(body, indent=2, sort_keys=True, ensure_ascii=False).encode('utf-8')
    return ((header_txt + '\n\n') + body_txt)
