ActiveCampaign / postmark-dotnet

A .NET library for the Postmark API
http://developer.postmarkapp.com/
Other
50 stars 46 forks source link

Add metadata to sending and searching of outbound messages #64

Closed jhuggart closed 6 years ago

jhuggart commented 6 years ago

This adds the Metadata property to PostmarkMessage to allow sending messages with metadata. Also, GetOutboundMessagesAsync now has an optional argument for searching on metadata.

jhuggart commented 6 years ago

Updated based on your feedback @atheken

atheken commented 6 years ago

@jhuggart Just FYI:

https://github.com/wildbit/postmark-dotnet/pull/64/commits/ba054f03cfd3e4728eb72689a82620a30051e9ca

If you look at how the metadata query is constructed, we should prefer passing a dictionary to the HttpClient and allowing it to construct the query parameters, as opposed to building these ourselves.

The main reason for this is that the HttpClient will properly URL-encode the query-string parameters for us, which may include stuff like &, :, /, etc.