Repository navigation
v1.0.8 - Custom Content-Type Header Support
Version 1.0.8 - Custom Content-Type Header Support
🎯 Critical Fix
Custom Content-Type headers are now properly respected when using RequestNodes.AddHeader with POST, PUT, and PATCH requests. This enables specialized REST API operations including:
- RFC 7396 Merge Patch (
application/merge-patch+json) - RFC 6902 JSON Patch (
application/json-patch+json) - Custom media types for API-specific requirements
🔧 Changes
- HttpRequest.cs: Updated
ToHttpRequestMessage()to preserve custom Content-Type headers - ExecuteNodes.cs: Enhanced documentation for POST, PUT, and PATCH methods
- Backward Compatible: Existing workflows continue functioning with default
application/json
📖 Usage Example
To use custom Content-Type headers:
RequestNodes.ByUrl(url)
→ RequestNodes.AddHeader(request, "Content-Type", "application/merge-patch+json")
→ RequestNodes.AsPatch(request, data)
→ ExecuteNodes.PATCH(client, "", request)
⚡ Migration
No changes required for existing workflows. This fix only applies when you explicitly set a custom Content-Type header via AddHeader. All existing code continues to work with default application/json behavior.
🙏 Credit
Thanks to the community member (Robert Manna) who reported the 415 Unsupported Media Type issue with specialized PATCH operations. This fix expands DynaFetch's compatibility with modern REST API patterns.
Full Changelog: https://github.com/YourUsername/DynaFetch/compare/v1.0.7...v1.0.8