code: def create_request(version, method, url, headers):
      
      # According to my measurements using b''.join is faster that constructing a
      # bytearray.
      message = []
      message.append('{} {} HTTP/{}\r\n'.format(method, url, version))
      for name, value in headers:
          message.append(name)
          message.append(': ')
          message.append(value)
          message.append('\r\n')
      message.append('\r\n')
      return s2b(''.join(message))
docs: Create a HTTP request header.