unleash-client-dotnet icon indicating copy to clipboard operation
unleash-client-dotnet copied to clipboard

Impossible to access GitLab API

Open sebreynier opened this issue 5 years ago • 2 comments

https://github.com/stiano/unleash-client-dotnet/blob/6a437ed9c4c5633490b2ff7893148b07108ffd0e/src/Unleash/Communication/UnleashApiClient.cs#L33

Hi, first of all, thanks for this plugin!

I use Unleash via the GitLab API and when I set up my instance of UnleashSettings, I use these settings:

var unleashSettings = new UnleashSettings()
{
    AppName = "my-project",
    InstanceTag = "eNxxx4x54x54x5x45x",
    UnleashApi = new Uri("https://gitlab.mydomain.com/api/v4/feature_flags/unleash/01234"),
};

With this config, I can't get the feature flags and I have an error.

But, if I just do this api call using Postman, it actually works: GET https://gitlab.mydomain.com/api/v4/feature_flags/unleash/01234/features HEADERS UNLEASH-APPNAME: my-project UNLEASH-INSTANCEID: eNxxx4x54x54x5x45x

I tried to debug and I found that the API call made by unleash-client-dotnet is: GET https://gitlab.mydomain.com/api/v4/feature_flags/unleash/api/client/features HEADERS UNLEASH-APPNAME: my-project UNLEASH-INSTANCEID: eNxxx4x54x54x5x45x

Could it be possible to have a setting to change this hardcoded api/client/features query?

Many thanks, Sébastien

sebreynier avatar Jan 28 '20 22:01 sebreynier

Hi @sebreynier,

the team behind Unleash has forked this client SDK and taken full responsibility to make the .Net client API compliant with our specification. We ironing out the last details before we release next major, which will be 100% compliant with other clients.

You find it at: https://github.com/Unleash/unleash-client-core

ivarconr avatar Jan 29 '20 07:01 ivarconr

Would @stiano be open to a readme change on this repo that directs users to the fork at https://github.com/Unleash/unleash-client-core ? I'd be glad to wordsmith it and send in a pr.

AndreasChristianson avatar Feb 02 '20 19:02 AndreasChristianson