Status Code always 0
Checking the status code of the k/v get response always return 0.
var getPair = await client.KV.Get(key, setting);
if (getPair.StatusCode == System.Net.HttpStatusCode.OK) // Alaways fail
{
var value = Encoding.UTF8.GetString(getPair.Response.Value, 0, getPair.Response.Value.Length));
}
I'm able to replicate this, and wow, this is a weird one. If I look at the debugger inside Client.cs for GetRequest.Execute I see the "OK" as the statuscode but if I look at it from outside the Execute method it shows 0. Investigating, thank you for the report.
Oh, I know why - I have to reconstruct an object for KVPairs specifically and I'm not copying a field. This should be a quick fix.
This should be resolved as of 0.6.4.0 which is available on Nuget: https://www.nuget.org/packages/Consul
Have fun!
Thank you @highlyunavailable for your quick response.