.NET Standard Client for Flagsmith. Ship features with confidence using feature flags and remote config. Host yourself or use our hosted version at https://www.flagsmith.com/
The below code generates an identity of ZZGGHH_abc rather than the expected ZZGGHH_abc&h=g. I suspect some of your code is not correctly url encoding inputs.
using Flagsmith;
namespace TestsForFlagSmith
{
public class IssueForFlagSmith : TestsCommon
{
protected static readonly Lazy<FlagsmithClient> _flagsmithClient = new Lazy<FlagsmithClient>(() => new FlagsmithClient("keyhere"));
[Test]
public async Task CorrectIdentityIsGenerated()
{
var identity = "ZZGGHH_abc&h=g";
var flags = await _flagsmithClient.Value.GetIdentityFlags(identity);
}
}
}
The below code generates an identity of
ZZGGHH_abc
rather than the expectedZZGGHH_abc&h=g
. I suspect some of your code is not correctly url encoding inputs.Note that the code does work if you pass in traits. So I suspect https://github.com/Flagsmith/flagsmith-dotnet-client/blob/4a83292a4b7b2752b5ca4fd38873e9d4b1adeab4/Flagsmith.FlagsmithClient/FlagsmithClient.cs#L366 needs fixing, but not https://github.com/Flagsmith/flagsmith-dotnet-client/blob/4a83292a4b7b2752b5ca4fd38873e9d4b1adeab4/Flagsmith.FlagsmithClient/FlagsmithClient.cs#L361 .