I have a Dictionary<string, object>
and I like to convert this dictionary into query string parameters and then use them with HttpRequestMessage and pass it to HttpClient.
I know we can pass Dictionaly<string, string>
to FormUrlEncodedContent e.g request.Content = new FormUrlEncodedContent(params)
but here the value can be any type and that's why it's object.
Previously I was using RestClient where there was an option to use any kind of parameter value e.g request.AddParameter("key", "value")
Now is there any way to do that with httpClient? I want to use it in a get call so setting request.Content is not must. I can use something else e.g UriBuilder etc.