Skip to content

v0.3.0: Access to message body parts

Compare
Choose a tag to compare
@wneessen wneessen released this 11 Oct 17:48
· 1279 commits to main since this release
94924cb

This release introduces a couple of new methods on the Msg as well as the Part. This will help the Msg.Middleware to be more extensible since we allow access not only to headers but also to body parts.

To get the Msg body parts, one can now utilize the Msg.GetParts() methods to get the list of currently assigned message parts to the Msg.

Each Part has now an additional list of getters/setters, to read and modify the given part:

  • Part.GetContent(): get the parts content
  • Part.GetContentType(): get the parts content type
  • Part.GetEncoding(): get the parts encoding
  • Part.GetWriteFunc(): get the parts write function

Each of these Part.Get*() methods also has an corresponding Part.Set*() methods what overrides the current value

Noteworthy changes

  • a3a2b0e Introduces the new getter/setter methods