You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's ok, but we can do better if those setters returned *this (especially if it's not res but a longer name). This widely used pattern is known as method chaining:
@vitaly-castLabs sorry for the late reply. Please go ahead to send the pull request, and be sure to include a unit test for the changes. Also could you please to the same to Request::set_header? Thanks a lot!
Preface
I often find myself writing code similar to this:
It's ok, but we can do better if those setters returned *this (especially if it's not
res
but a longer name). This widely used pattern is known as method chaining:Looks neater (imo) and only requires adding
return *this;
Will you be interested in merging a PR adding this feature? Here's an example:
vitaly-castLabs@6ad63ea
The text was updated successfully, but these errors were encountered: