From e61399b0c9add30fd1ec33df9b5de92e5bbd4eae Mon Sep 17 00:00:00 2001 From: raj pandey Date: Tue, 3 Sep 2024 18:30:01 +0530 Subject: [PATCH 1/2] added early access header --- CHANGELOG.md | 6 ++++++ Contentstack.Core/Configuration/ContentstackOptions.cs | 7 ++++++- Contentstack.Core/ContentstackClient.cs | 4 ++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8429910..967fa85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +### Version: 2.16.0 +#### Date: Sep-3-2024 + +##### New Feature: +- Added Early Access Header Support + ### Version: 2.15.0 #### Date: Jul-30-2024 diff --git a/Contentstack.Core/Configuration/ContentstackOptions.cs b/Contentstack.Core/Configuration/ContentstackOptions.cs index 73f2455..62c1cf5 100644 --- a/Contentstack.Core/Configuration/ContentstackOptions.cs +++ b/Contentstack.Core/Configuration/ContentstackOptions.cs @@ -74,8 +74,13 @@ public ContentstackOptions() { Timeout = 30000; // Set default value } - } + /// + /// TheEarlyAccessHeader used to set service which the user has early access to. + /// + public string[] EarlyAccessHeader { get; set; } + } + internal class ContentstackRegionConverter : TypeConverter { public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) diff --git a/Contentstack.Core/ContentstackClient.cs b/Contentstack.Core/ContentstackClient.cs index b03836e..436c82a 100644 --- a/Contentstack.Core/ContentstackClient.cs +++ b/Contentstack.Core/ContentstackClient.cs @@ -87,6 +87,10 @@ public ContentstackClient(IOptions options) { this.SetHeader("access_token", _options.DeliveryToken); } + if(_options.EarlyAccessHeader !=null) + { + this.SetHeader("x-header-ea", string.Join(",", _options.EarlyAccessHeader)); + } Config cnfig = new Config(); cnfig.Environment = _options.Environment; if (_options.Host != null) From 6c0bce1ba5142a173cfee1475d3a63665ee80eab Mon Sep 17 00:00:00 2001 From: raj pandey Date: Wed, 4 Sep 2024 11:12:35 +0530 Subject: [PATCH 2/2] version bump --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index c39d590..0b3a5c9 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,5 +1,5 @@ - 2.15.0 + 2.16.0