Closed xuexin closed 5 years ago
Before, we had the same Response
object, why I split them up is because having one Response
object was kind of slow, as it had a if
chain like this: https://github.com/Jaguar-dart/jaguar/blob/d6268cf99ac67c8e0bf9ec92e49ef09b0d01b8d9/lib/src/http/response/import.dart#L131
It seems that I didn’t express enough.
I mean the method writeResponse
should be called by subclass, many process (like adding header) should be packaged in parent class.
Sure! Send in the pull request.
We have a lot of response types now, and all of them have same attribute. But responses of them are mutually independent, it will cause confusions and bugs. Perhaps I do this in next weeks?