Jaguar-dart/jaguar

How about refactoring the code for the response?

Closed this issue · 3 comments

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?

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:

if (value is String) {

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.