diff --git a/responder/models.py b/responder/models.py index 2ec0690..9450096 100644 --- a/responder/models.py +++ b/responder/models.py @@ -18,7 +18,6 @@ from .status_codes import HTTP_200 class QueryDict(dict): def __init__(self, query_string): - query_string = query_string self.update(parse_qs(query_string)) def __getitem__(self, key): @@ -87,6 +86,17 @@ class QueryDict(dict): # TODO: add slots class Request: + __slots__ = [ + "_starlette", + "formats", + "headers", + "mimetype", + "method", + "full_url", + "url", + "params", + ] + def __init__(self, scope, receive): self._starlette = StarletteRequest(scope, receive) self.formats = None @@ -152,6 +162,17 @@ class Request: class Response: + __slots__ = [ + "req", + "status_code", + "text", + "content", + "encoding", + "media", + "headers", + "formats", + ] + def __init__(self, req, *, formats): self.req = req self.status_code = HTTP_200 #: The HTTP Status Code to use for the Response.