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
I think we agreed via email it would be good to have PowerstripProtocolVersion in headers since if we change the structure or content type, we'd lose a reliable way to check the version. We'd have to version how we version! Kidding. For a similar but different reason, I think Type should not be in JSON either.
When you're used to Python/Ruby you don't think about this as much, but it really sucks to have data structures define what they inside themselves. Imagine Content-Type being part of the body. What!? How would you handle that?
@lukemarsden I disagree, I think we can continue to consider this without making a decision on #44.
I'm in favour of this proposal. We should be able to determine the schema of the body just from the header, and this includes both the version AND whether or not is is a pre/post hook.
I think we agreed via email it would be good to have
PowerstripProtocolVersion
in headers since if we change the structure or content type, we'd lose a reliable way to check the version. We'd have to version how we version! Kidding. For a similar but different reason, I thinkType
should not be in JSON either.When you're used to Python/Ruby you don't think about this as much, but it really sucks to have data structures define what they inside themselves. Imagine Content-Type being part of the body. What!? How would you handle that?
Using Go makes this obvious since we have to parse the payload twice to determine which type of struct to use when unmarshaling: https://github.com/ClusterHQ/powerstrip/blob/golang/protocol_test.go#L15
The text was updated successfully, but these errors were encountered: