Hello, I'm calling an external API from my C# code & I'm getting the data in JSON format. When I try to deserialize and display the output it returns null. Below is my code.
httpClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", accessToken);
var rfeUrl = $"{urlRFE}{domaine}/RFE/V1/getsastoken/{containerName}";
var rfeResponse = await httpClient.GetAsync(rfeUrl);
var rfeResponseContent = await rfeResponse.Content.ReadAsStringAsync();
var sasKey = JsonSerializer.Deserialize<SasKey>(rfeResponseContent);
Console.WriteLine(JsonSerializer.Serialize(sasKey));
I'm getting the below values in rfeResponseContent but when i use
JsonSerializer.Deserialize it return empty
blobServiceUri: "https://dat8b2901sta003cfetest.blob.core.windows.net/"
containerName: "90457559-90457559-002-test-main"
sasToken: "?sv=2019-02-02&sr=c&sig=lsQNj%2BOvmGQB6cV8yXnp7tGdOiKUJTH55WAiZlQHKkk%3D&se=2024-08-21T06%3A34%3A52Z&sp=racwdl"
Class
public class SasKey
{
public string BlobServiceUri { get; set; }
public string ContainerName { get; set; }
public string SasToken { get; set; }
}