How about refactoring the code for the response?
Closed this issue · 3 comments
xuexin commented
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?
tejainece commented
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:
jaguar/lib/src/http/response/import.dart
Line 131 in d6268cf
xuexin commented
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.
tejainece commented
Sure! Send in the pull request.