public static async Task <HttpResponseMessage> HttpJsonRequestAsync <TRequest>
     (this HttpClient httpClient, HttpMethod httpMethod, string requestUrl,
     TRequest request, Action <HttpRequestMessage>?requestAction = null,
     CancellationToken cancellationToken = default)
 {
     Guard.NotNull(httpClient);
     using var requestMessage = new HttpRequestMessage(httpMethod, requestUrl)
           {
               Content = JsonHttpContent.From(request)
           };
     requestAction?.Invoke(requestMessage);
     return(await httpClient.SendAsync(requestMessage, cancellationToken));
 }
        public static async Task <TResponse?> HttpJsonAsync <TRequest, TResponse>
            (this HttpClient httpClient, HttpMethod httpMethod, string requestUrl,
            TRequest request, Action <HttpRequestMessage>?requestAction = null,
            Action <HttpResponseMessage>?responseAction = null,
            CancellationToken cancellationToken         = default)
        {
            Guard.NotNull(httpClient);
            using var requestMessage = new HttpRequestMessage(httpMethod, requestUrl)
                  {
                      Content = JsonHttpContent.From(request)
                  };
            requestAction?.Invoke(requestMessage);
            using var response = await httpClient.SendAsync(requestMessage, cancellationToken);

            responseAction?.Invoke(response);
#if NET6_0_OR_GREATER
            var responseText = await response.Content.ReadAsStringAsync(cancellationToken);
#else
            var responseText = await response.Content.ReadAsStringAsync();
#endif
            return(JsonConvert.DeserializeObject <TResponse>(responseText));
        }