'Encode this request as a URL to GET.
@param server_url: The URL of the OpenID server to make this request of.
@type server_url: str
@returntype: str
@raises NoReturnError: when I do not have a return_to.'

def encodeToURL(self, server_url):

    if (not self.return_to):
        raise NoReturnToError
    q = {'mode': self.mode, 'identity': self.identity, 'claimed_id': self.claimed_id, 'return_to': self.return_to}
    if self.trust_root:
        if self.message.isOpenID1():
            q['trust_root'] = self.trust_root
        else:
            q['realm'] = self.trust_root
    if self.assoc_handle:
        q['assoc_handle'] = self.assoc_handle
    response = Message(self.message.getOpenIDNamespace())
    response.updateArgs(OPENID_NS, q)
    return response.toURL(server_url)
