Use UriBuilder to create request uri
This commit is contained in:
parent
4bc663c2ab
commit
6d6e91867c
@ -54,7 +54,11 @@ public class DatabaseClient : IDatabaseClient
|
|||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string request = @"https://rh.cebotari.ru/api/search?query=" + line;
|
UriBuilder builder = new(@"https://rh.cebotari.ru/api/search")
|
||||||
|
{
|
||||||
|
Query = $"query={line.Replace("&", "%26")}"
|
||||||
|
};
|
||||||
|
string request = builder.Uri.AbsoluteUri;
|
||||||
|
|
||||||
if (!_memoryCache.TryGetValue(line, out IEnumerable<Product> products))
|
if (!_memoryCache.TryGetValue(line, out IEnumerable<Product> products))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user