Releases: EasyPost/easyvcr-csharp
Releases · EasyPost/easyvcr-csharp
v0.12.0
- Add support for censoring XML, HTML and plain text bodies
- [BREAKING CHANGE]
CensorElement
now abstract base class, cannot be used directly- Three types of
CensorElement
options available:KeyCensorElement
: Censor the value of a specified key (will be ignored if used for plain text/HTML data)RegexCensorElement
: Censor any string that matches a specified regex pattern (will check the value of a key-value pair if used for JSON/XML data)TextCensorElement
: Censor a specified string (will check the value of a key-value pair if used for JSON/XML data; requires the whole body to match the specified string if used for plain text/HTML data)
- Body censoring:
KeyCensorElement
(recommended for JSON/XML if key is known),TextCensorElement
(recommended for JSON/XML if value is known), andRegexCensorElement
(recommended for plain text/HTML) - Path element censoring: Use
RegexCensorElement
- Query parameter censoring: Use
KeyCensorElement
- Header censoring: Use
KeyCensorElement
- Three types of
- [BREAKING CHANGE]
CensorHeadersByKeys
,CensorBodyElementsByKeys
,CensorQueryParametersByKeys
andCensorPathElementsByPatterns
removed- Use
CensorHeaders
,CensorBodyElements
,CensorQueryParameters
andCensorPathElements
instead
- Use
- Add .NET 9.0 support
v0.11.0
What's Changed
- Add missing .NET 8.0 DLLs to the NuGet package
Related PRs
- [chore] Port Makefile steps by @nwithan8 in #63
- [chore] Only run final CI step if triggered by a "release" by @nwithan8 in #64
- [fix] Include .NET 8.0-compatible DLLs in NuGet package by @nwithan8 in #65
Full Changelog: v0.10.0...v0.11.0
v0.10.0
What's Changed
- Add .NET 8.0 support
AdvancedSettings
usesMatchRules.Default
instead of a new instance ofMatchRules
if not provided during construction- Fix
NullReferenceException
when trying to match by body with a null body (refit
compatibility) (Closes #58)
Related PRs
- Fix unit tests by @Greybird in #54
- [chore] Add .NET 8.0 support by @nwithan8 in #56
- Fix misalignment between AdvancedSettings defaults and VCRHandler constructor by @Greybird in #55
- Make Request properties and VCRHandler type public by @Greybird in #57
- [chore] Prep GitHub Action-based release process by @nwithan8 in #60
- fix: avoid null exception when received body is empty but recorded body isn't by @jhonny-apiiro in #59
- [chore] Prep 0.10.0 release by @nwithan8 in #62
New Contributors
- @Greybird made their first contribution in #54
- @jhonny-apiiro made their first contribution in #59
Full Changelog: v0.9.0...v0.10.0
v0.9.0
v0.8.0
- Adds ability to censor parts of a URL path using regex patterns
- Fixes a bug that would throw error if trying to "match by body" with non-JSON bodies.
v0.7.0
- Add support for .NET 7
v0.6.0
- Add support for client cloning (useful when trying to re-use EasyVCR's HTTP client as an inner client inside multiple HTTP clients)
- This avoids an error where some clients, like RestSharp, expect the inner client to be a new instance each time
- EasyVCR now uses an
EasyVCRHTTPClient
class instead ofHttpClient
to allow for internal functionalityEasyVCRHTTPClient
implementsHttpClient
, so it can be used anywhere aHttpClient
is expected
v0.5.1
v0.5.0
- New feature: Set expiration time for interactions (how long since it was recorded should an interaction be considered valid)
- Can determine what to do if a matching interaction is considered invalid:
- Warn the user, but proceed with the interaction
- Throw an exception
- Automatically re-record (cannot be used in
Replay
mode)
- Can determine what to do if a matching interaction is considered invalid:
- New feature: Pass in a custom ILogger instance to EasyVCR to funnel log messages into your own logging setup (fallback: logs to console)
- Improvement: Clarify that Delay may not be exact
v0.4.0
- Improvements to censoring
- Ability to define censored elements individually, with per-element case sensitivity
- Improvements to matching
- Ability to ignore certain elements when matching by body