From 66dd2db74eaa3c176c5be6c136c0c441103c382f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 18 Jan 2024 18:59:41 +0400 Subject: [PATCH] Update dependency Flurl.Http to v4 (#24) * Update dependency Flurl.Http to v4 * fix for flurl --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Vita Chumakova --- YandexKeyExtractor/WebHandler.cs | 17 ++++++++--------- YandexKeyExtractor/YandexKeyExtractor.csproj | 3 +-- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/YandexKeyExtractor/WebHandler.cs b/YandexKeyExtractor/WebHandler.cs index b63ab5a..75d12ab 100644 --- a/YandexKeyExtractor/WebHandler.cs +++ b/YandexKeyExtractor/WebHandler.cs @@ -8,7 +8,7 @@ using System.Text.Json; using System.Text.Json.Serialization; using System.Threading.Tasks; using Flurl.Http; -using Flurl.Serialization.TextJson; +using Flurl.Http.Configuration; using YandexKeyExtractor.Models; namespace YandexKeyExtractor; @@ -50,8 +50,9 @@ public sealed class WebHandler : IDisposable { DefaultRequestHeaders = {UserAgent = {new ProductInfoHeaderValue("okhttp", "2.7.5")}}, BaseAddress = new Uri("https://registrator.mobile.yandex.net/1/") - } - ).Configure(settings => settings.WithTextJsonSerializer(jsonSettings)); + }); + + client.Settings.JsonSerializer = new DefaultJsonSerializer(jsonSettings); return new WebHandler(client); } @@ -91,8 +92,8 @@ public sealed class WebHandler : IDisposable { phone_number = phoneNumber, country - } - ).ReceiveJson(); + }) + .ReceiveJson(); ValidateResponse(phoneNumberResponse, nameof(phoneNumberResponse)); @@ -110,8 +111,7 @@ public sealed class WebHandler : IDisposable display_language = "en", number = phone, country - } - ) + }) .ReceiveJson(); if (!ValidateResponse(trackResponse, nameof(trackResponse))) @@ -152,8 +152,7 @@ public sealed class WebHandler : IDisposable number = phone, track_id = trackID, country - } - ) + }) .ReceiveJson(); if (!ValidateResponse(backupInfoResponse, nameof(backupInfoResponse))) diff --git a/YandexKeyExtractor/YandexKeyExtractor.csproj b/YandexKeyExtractor/YandexKeyExtractor.csproj index 4c9c95f..f195a55 100644 --- a/YandexKeyExtractor/YandexKeyExtractor.csproj +++ b/YandexKeyExtractor/YandexKeyExtractor.csproj @@ -20,8 +20,7 @@ - - +