Skip to content

Commit

Permalink
Merge pull request #51 from contentstack/fix/DX-1213
Browse files Browse the repository at this point in the history
DX - 1213 - added early access header
  • Loading branch information
cs-raj authored Sep 4, 2024
2 parents f5d6028 + 6c0bce1 commit 1ed0f93
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
7 changes: 6 additions & 1 deletion Contentstack.Core/Configuration/ContentstackOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,13 @@ public ContentstackOptions()
{
Timeout = 30000; // Set default value
}
}

/// <summary>
/// TheEarlyAccessHeader used to set service which the user has early access to.
/// </summary>
public string[] EarlyAccessHeader { get; set; }
}

internal class ContentstackRegionConverter : TypeConverter
{
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
Expand Down
4 changes: 4 additions & 0 deletions Contentstack.Core/ContentstackClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ public ContentstackClient(IOptions<ContentstackOptions> 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)
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<Version>2.15.0</Version>
<Version>2.16.0</Version>
</PropertyGroup>
</Project>

0 comments on commit 1ed0f93

Please sign in to comment.