Separate out the matrix http client completely because just about all of its code it now separate from the simple case we need for standard HTTP(S)

This commit is contained in:
David Baker 2014-11-20 17:41:56 +00:00
parent 20326054da
commit e377d33652
8 changed files with 362 additions and 338 deletions

View file

@ -99,8 +99,12 @@ class LoginHandler(BaseHandler):
def _query_email(self, email):
httpCli = SimpleHttpClient(self.hs)
data = yield httpCli.get_json(
'matrix.org:8090', # TODO FIXME This should be configurable.
"/_matrix/identity/api/v1/lookup?medium=email&address=" +
"%s" % urllib.quote(email)
# TODO FIXME This should be configurable.
# XXX: ID servers need to use HTTPS
"http://%s%s" % ("matrix.org:8090", "/_matrix/identity/api/v1/lookup"),
{
'medium': 'email',
'address': email
}
)
defer.returnValue(data)