Skip to content

Commit

Permalink
Allow overwrite of Header: X-Client-Info
Browse files Browse the repository at this point in the history
  • Loading branch information
acupofjose committed Aug 25, 2021
1 parent c4756e0 commit f595128
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
5 changes: 4 additions & 1 deletion Postgrest/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ public static Dictionary<string, string> PrepareRequestHeaders(HttpMethod method
headers.Add("Range", $"{rangeFrom}-{(rangeTo != int.MinValue ? rangeTo.ToString() : null)}");
}

headers.Add("X-Client-Info", Util.GetAssemblyVersion());
if (!headers.ContainsKey("X-Client-Info"))
{
headers.Add("X-Client-Info", Util.GetAssemblyVersion());
}

return headers;
}
Expand Down
6 changes: 3 additions & 3 deletions Postgrest/Postgrest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
The bulk of this library is a translation and c-sharp-ification of the supabase/postgrest-js library.</Description>
<PackageIconUrl>https://avatars.githubusercontent.com/u/54469796?s=200&amp;v=4</PackageIconUrl>
<PackageTags>supabase,postgrest</PackageTags>
<ReleaseVersion>1.0.7</ReleaseVersion>
<PackageVersion>1.0.7</PackageVersion>
<ReleaseVersion>1.0.8</ReleaseVersion>
<PackageVersion>1.0.8</PackageVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Version)' == '' ">
<VersionPrefix Condition=" '$(VersionPrefix)' == '' ">1.0.7</VersionPrefix>
<VersionPrefix Condition=" '$(VersionPrefix)' == '' ">1.0.8</VersionPrefix>
<VersionSuffix Condition=" '$(VersionSuffix)' == '' ">
</VersionSuffix>
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionPrefix)-$(VersionSuffix)</Version>
Expand Down
2 changes: 1 addition & 1 deletion PostgrestExample/PostgrestExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<ReleaseVersion>1.0.7</ReleaseVersion>
<ReleaseVersion>1.0.8</ReleaseVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion PostgrestTests/PostgrestTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>netcoreapp3.1</TargetFramework>

<IsPackable>false</IsPackable>
<ReleaseVersion>1.0.7</ReleaseVersion>
<ReleaseVersion>1.0.8</ReleaseVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion postgrest-csharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ Global
$1.DirectoryNamespaceAssociation = PrefixedHierarchical
$0.StandardHeader = $2
$0.VersionControlPolicy = $3
version = 1.0.7
version = 1.0.8
EndGlobalSection
EndGlobal

0 comments on commit f595128

Please sign in to comment.