I am trying to correct this text, using Bing Spell API
I am using postman, just to see what I get in return, but I do not know where to put the text
https://api.bing.microsoft.com/v7.0/spellcheck?proof&en-US
This is the text I want to correct
I believe we have some power over who we love.It isn't just something that happens to a person.And yes, you can stand there and tell me that the poets would disagree, but I am not a poet.I am just a woman and as a woman I have no way to make money.Not enough to earn a living and support my family.Even if I had my own money, which I don't, it would belong to my husband the minute we were married.If we have children, they belong to him, not me. They are his property.So don't sit there and tell me that marriage isn't an economic proposition, because it is. It may not be for you.But it most certainly is for me.That will be Fred now.How do I look?Do I look alright?
I did it in c#, and I got 401
static string Url = "https://api.bing.microsoft.com/v7.0/spellcheck?proof&en-US";
readonly HttpClient Client = new();
public BingService()
{
Client = new HttpClient();
Client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", Key);
}
public async Task<SpellCheckModel?> BingProcessString(string str)
{
var text = $"&text={str}";
var res = await Client.GetAsync($"{Url}{text}");
if (res.IsSuccessStatusCode)
{
var model = await res.Content.ReadFromJsonAsync<SpellCheckModel>();
return model;
}
return null;
}
And finally I call it in my VM
public MainWindowViewModel()
{
CopyCommand = new Command(CopyAction);
//AzureCommand = new Command(AzureActionAsync);
Words = new List<char>();
str = "I believe we have some power over who we love.It isn't just something that happens to a person.And yes, you can stand there and tell me that the poets would disagree, but I am not a poet.I am just a woman and as a woman I have no way to make money.Not enough to earn a living and support my family.Even if I had my own money, which I don't, it would belong to my husband the minute we were married.If we have children, they belong to him, not me. They are his property.So don't sit there and tell me that marriage isn't an economic proposition, because it is. It may not be for you.But it most certainly is for me.That will be Fred now.How do I look?Do I look alright?";
bs.BingProcessString(str);
}
![236686-image.png][2] [2]: /api/attachments/236686-image.png?platform=QnA