v1.0.0
⚠️ This release contains a Breaking change regarding v0.x ⚠️
Change
invert the stack computation:
middleware
[t1, t2, t3, t4].DecorateHandler(<yourHandler>) == t4(t3(t2(t1(<yourHandler>))))
becomes
[t1, t2, t3, t4].DecorateHandler(<yourHandler>) == t1(t2(t3(t4(<yourHandler>))))
tripperware
[t1, t2, t3, t4].DecorateRoundTripper(<yourTripper>) == t4(t3(t2(t1(<yourTripper>))))
become
[t1, t2, t3, t4].DecorateRoundTripper(<yourTripper>) == t1(t2(t3(t4(<yourTripper>))))
Migration note
In order to correctly update version you must invert all your stack order
Example:
stack := httpware.TripperwareStack(
MyTripperwareA,
MyTripperwareB,
)
stack.Append(
MyTripperwareC,
MyTripperwareD,
)
// MyTripperwareD(MyTripperwareC(MyTripperwareB(MyTripperwareA(<yourtripper>))))
becomes
stack := httpware.TripperwareStack(
MyTripperwareB,
MyTripperwareA,
)
stack.Prepend(
MyTripperwareD,
MyTripperwareC,
)
// MyTripperwareD(MyTripperwareC(MyTripperwareB(MyTripperwareA(<yourtripper>))))