diff --git a/Flurl.Http.Xml.sln b/Flurl.Http.Xml.sln
deleted file mode 100644
index b407d1c..0000000
--- a/Flurl.Http.Xml.sln
+++ /dev/null
@@ -1,44 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.28803.156
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F2114366-0322-434F-91D3-A25939F0CFA7}"
- ProjectSection(SolutionItems) = preProject
- .gitattributes = .gitattributes
- .gitignore = .gitignore
- appveyor.yml = appveyor.yml
- global.json = global.json
- README.md = README.md
- EndProjectSection
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{5B74B194-432C-4581-B683-22FB89C46AD3}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flurl.Http.Xml.Tests", "test\Flurl.Http.Xml.Tests\Flurl.Http.Xml.Tests.csproj", "{7BA9BC27-1501-47EA-90FF-BCDBD25CA8B8}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flurl.Http.Xml", "src\Flurl.Http.Xml\Flurl.Http.Xml.csproj", "{B9826CF6-17DD-4D2D-A6BD-F15CFA18F9CB}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {7BA9BC27-1501-47EA-90FF-BCDBD25CA8B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7BA9BC27-1501-47EA-90FF-BCDBD25CA8B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7BA9BC27-1501-47EA-90FF-BCDBD25CA8B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B9826CF6-17DD-4D2D-A6BD-F15CFA18F9CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B9826CF6-17DD-4D2D-A6BD-F15CFA18F9CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B9826CF6-17DD-4D2D-A6BD-F15CFA18F9CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B9826CF6-17DD-4D2D-A6BD-F15CFA18F9CB}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {7BA9BC27-1501-47EA-90FF-BCDBD25CA8B8} = {5B74B194-432C-4581-B683-22FB89C46AD3}
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {7B202065-8A02-433F-93A2-248DC8ABB65B}
- EndGlobalSection
-EndGlobal
diff --git a/FlurlX.Http.Xml.sln b/FlurlX.Http.Xml.sln
new file mode 100644
index 0000000..7a4c0ae
--- /dev/null
+++ b/FlurlX.Http.Xml.sln
@@ -0,0 +1,40 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.8.34330.188
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F2114366-0322-434F-91D3-A25939F0CFA7}"
+ ProjectSection(SolutionItems) = preProject
+ .gitattributes = .gitattributes
+ .gitignore = .gitignore
+ appveyor.yml = appveyor.yml
+ global.json = global.json
+ README.md = README.md
+ EndProjectSection
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FlurlX.Http.Xml.Tests", "test\FlurlX.Http.Xml.Tests\FlurlX.Http.Xml.Tests.csproj", "{C01421A9-2746-4319-A96B-BEB21E6C349F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FlurlX.Http.Xml", "src\FlurlX.Http.Xml\FlurlX.Http.Xml.csproj", "{A9B5243D-9BB9-4F70-BF1F-A3716A5AF4CD}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {C01421A9-2746-4319-A96B-BEB21E6C349F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C01421A9-2746-4319-A96B-BEB21E6C349F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C01421A9-2746-4319-A96B-BEB21E6C349F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C01421A9-2746-4319-A96B-BEB21E6C349F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A9B5243D-9BB9-4F70-BF1F-A3716A5AF4CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A9B5243D-9BB9-4F70-BF1F-A3716A5AF4CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A9B5243D-9BB9-4F70-BF1F-A3716A5AF4CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A9B5243D-9BB9-4F70-BF1F-A3716A5AF4CD}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {7B202065-8A02-433F-93A2-248DC8ABB65B}
+ EndGlobalSection
+EndGlobal
diff --git a/global.json b/global.json
index 48934da..0396c1f 100644
--- a/global.json
+++ b/global.json
@@ -1,7 +1,7 @@
{
"projects": [ "src", "test" ],
"sdk": {
- "version": "3.1.202",
+ "version": "8.0.100",
"rollForward": "latestFeature"
}
}
diff --git a/src/Flurl.Http.Xml/FlurlHttpSettingsExtensions.cs b/src/Flurl.Http.Xml/FlurlHttpSettingsExtensions.cs
deleted file mode 100644
index 0267663..0000000
--- a/src/Flurl.Http.Xml/FlurlHttpSettingsExtensions.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using System;
-using System.Text;
-using System.Xml;
-using Flurl.Http.Configuration;
-
-namespace Flurl.Http.Xml
-{
- ///
- /// FlurlHttpSettingsExtensions
- ///
- public static class FlurlHttpSettingsExtensions
- {
- private static XmlWriterSettings s_xmlWriterSettings = new XmlWriterSettings { Encoding = new UTF8Encoding(false, false), Indent = true, OmitXmlDeclaration = false };
- private static readonly Lazy s_xmlSerializerInstance = new Lazy(() => new MicrosoftXmlSerializer(s_xmlWriterSettings));
-
- ///
- /// XMLs the serializer.
- ///
- /// The settings.
- public static MicrosoftXmlSerializer XmlSerializer(this FlurlHttpSettings settings)
- {
- return settings.XmlSerializer(s_xmlWriterSettings);
- }
-
- ///
- /// XMLs the serializer.
- ///
- /// The settings.
- /// The XML writer settings.
- // ReSharper disable once UnusedParameter.Local
- private static MicrosoftXmlSerializer XmlSerializer(this FlurlHttpSettings settings, XmlWriterSettings xmlWriterSettings)
- {
- s_xmlWriterSettings = xmlWriterSettings;
- return s_xmlSerializerInstance.Value;
- }
- }
-}
diff --git a/src/Flurl.Http.Xml/MicrosoftXmlSerializer.cs b/src/Flurl.Http.Xml/MicrosoftXmlSerializer.cs
deleted file mode 100644
index 18f7605..0000000
--- a/src/Flurl.Http.Xml/MicrosoftXmlSerializer.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-using System.IO;
-using System.Xml;
-using System.Xml.Linq;
-using System.Xml.Serialization;
-using Flurl.Http.Configuration;
-
-namespace Flurl.Http.Xml
-{
- ///
- /// ISerializer implementation that uses Microsoft XmlSerializer.
- /// Default serializer used in calls to GetXmlAsync, PostXmlAsync, etc.
- ///
- public class MicrosoftXmlSerializer : ISerializer
- {
- private readonly XmlWriterSettings _xmlWriterSettings;
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// The XML writer settings.
- public MicrosoftXmlSerializer(XmlWriterSettings xmlWriterSettings)
- {
- _xmlWriterSettings = xmlWriterSettings;
- }
-
- ///
- /// Serializes an object to a string representation.
- ///
- ///
- public string Serialize(object obj)
- {
- using (var writer = new Utf8StringWriter())
- using (var xmlWriter = XmlWriter.Create(writer, _xmlWriterSettings))
- {
- var serializer = new XmlSerializer(obj.GetType());
- serializer.Serialize(xmlWriter, obj);
- return writer.ToString();
- }
- }
-
- private static string TextReaderToString(TextReader reader)
- {
- using (reader)
- {
- return reader.ReadToEnd();
- }
- }
-
- private static XDocument StringToXDocument(string s)
- {
- var doc = XDocument.Parse(s);
- if (doc.Declaration == null)
- {
- doc.Declaration = new XDeclaration("1.0", "utf-8", "yes");
- }
-
- return doc;
- }
-
- private static T DeserializeInternal(TextReader reader)
- {
- string xml = TextReaderToString(reader);
- var doc = StringToXDocument(xml);
- string xmlWithDeclaration = doc.ToStringWithDeclaration();
-
- using (var textReader = new StringReader(xmlWithDeclaration))
- {
- var serializer = new XmlSerializer(typeof(T));
- return (T)serializer.Deserialize(textReader);
- }
- }
-
- ///
- /// Deserializes an object from a string representation.
- ///
- ///
- /// The string.
- public T Deserialize(string s) => string.IsNullOrWhiteSpace(s) ? default : DeserializeInternal(new StringReader(s));
-
- ///
- /// Deserializes an object from a stream representation.
- ///
- ///
- /// The stream.
- public T Deserialize(Stream stream) => stream == null ? default : DeserializeInternal(new StreamReader(stream));
- }
-}
\ No newline at end of file
diff --git a/src/Flurl.Http.Xml/CapturedXmlContent.cs b/src/FlurlX.Http.Xml/CapturedXmlContent.cs
similarity index 96%
rename from src/Flurl.Http.Xml/CapturedXmlContent.cs
rename to src/FlurlX.Http.Xml/CapturedXmlContent.cs
index dd6e1b0..0a10b74 100644
--- a/src/Flurl.Http.Xml/CapturedXmlContent.cs
+++ b/src/FlurlX.Http.Xml/CapturedXmlContent.cs
@@ -1,6 +1,6 @@
using Flurl.Http.Content;
-namespace Flurl.Http.Xml
+namespace FlurlX.Http.Xml
{
///
/// Provides HTTP content based on a serialized XML object, with the XML string captured to a property
diff --git a/src/FlurlX.Http.Xml/FlurlHttpSettingsExtensions.cs b/src/FlurlX.Http.Xml/FlurlHttpSettingsExtensions.cs
new file mode 100644
index 0000000..26820fd
--- /dev/null
+++ b/src/FlurlX.Http.Xml/FlurlHttpSettingsExtensions.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Text;
+using System.Xml;
+
+namespace FlurlX.Http.Xml
+{
+ ///
+ /// FlurlHttpSettingsExtensions
+ ///
+ public static class FlurlHttpSettingsExtensions
+ {
+ private static XmlWriterSettings s_xmlWriterSettings = new XmlWriterSettings { Encoding = new UTF8Encoding(false, false), Indent = true, OmitXmlDeclaration = false };
+ private static readonly Lazy s_xmlSerializerInstance = new Lazy(() => new MicrosoftXmlSerializer(s_xmlWriterSettings));
+
+ ///
+ /// XMLs the serializer.
+ ///
+ public static MicrosoftXmlSerializer XmlSerializer()
+ {
+ return s_xmlSerializerInstance.Value;
+ }
+ }
+}
diff --git a/src/Flurl.Http.Xml/FlurlRequestExtensions.cs b/src/FlurlX.Http.Xml/FlurlRequestExtensions.cs
similarity index 66%
rename from src/Flurl.Http.Xml/FlurlRequestExtensions.cs
rename to src/FlurlX.Http.Xml/FlurlRequestExtensions.cs
index 689f51b..2a6d7b6 100644
--- a/src/Flurl.Http.Xml/FlurlRequestExtensions.cs
+++ b/src/FlurlX.Http.Xml/FlurlRequestExtensions.cs
@@ -1,4 +1,5 @@
-using System;
+using Flurl.Http;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
@@ -7,28 +8,13 @@
using System.Xml;
using System.Xml.Linq;
-namespace Flurl.Http.Xml
+namespace FlurlX.Http.Xml
{
///
/// FlurlRequestExtensions
///
public static class FlurlRequestExtensions
{
- ///
- /// Sends an asynchronous GET request.
- ///
- ///
- /// The request.
- /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. Optional.
- /// The HttpCompletionOption used in the request. Optional.
- ///
- /// A Task whose result is the XML response body deserialized to an object of type T.
- ///
- public static Task GetXmlAsync(this IFlurlRequest request,
- CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
- {
- return request.SendAsync(HttpMethod.Get, null, cancellationToken, completionOption).ReceiveXml();
- }
///
/// Sends an asynchronous GET request.
@@ -40,10 +26,9 @@ public static Task GetXmlAsync(this IFlurlRequest request,
/// A Task whose result is the XML response body parsed into an XDocument.
///
public static Task GetXDocumentAsync(this IFlurlRequest request,
- CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
- {
- return request.SendAsync(HttpMethod.Get, null, cancellationToken, completionOption).ReceiveXDocument();
- }
+ HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead,
+ CancellationToken cancellationToken = default
+ ) => request.SendAsync(HttpMethod.Get, null, cancellationToken: cancellationToken, completionOption: completionOption).ReceiveXDocument();
///
/// Sends an asynchronous GET request.
@@ -56,10 +41,9 @@ public static Task GetXDocumentAsync(this IFlurlRequest request,
/// A Task whose result is the XML response body parsed into a collection of XElements.
///
public static Task> GetXElementsFromXPath(this IFlurlRequest request, string expression,
- CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
- {
- return request.SendAsync(HttpMethod.Get, null, cancellationToken, completionOption).ReceiveXElementsFromXPath(expression);
- }
+ HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead,
+ CancellationToken cancellationToken = default
+ ) => request.SendAsync(HttpMethod.Get, null, cancellationToken: cancellationToken, completionOption: completionOption).ReceiveXElementsFromXPath(expression);
///
/// Sends an asynchronous GET request.
@@ -72,22 +56,25 @@ public static Task> GetXElementsFromXPath(this IFlurlReque
///
/// A Task whose result is the XML response body parsed into a collection of XElements.
///
- public static Task> GetXElementsFromXPath(this IFlurlRequest request, string expression, IXmlNamespaceResolver resolver,
- CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
- {
- return request.SendAsync(HttpMethod.Get, null, cancellationToken, completionOption).ReceiveXElementsFromXPath(expression, resolver);
- }
+ public static Task> GetXElementsFromXPath(this IFlurlRequest request,
+ string expression,
+ IXmlNamespaceResolver resolver,
+ HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead,
+ CancellationToken cancellationToken = default
+ ) => request.SendAsync(HttpMethod.Get, null, cancellationToken: cancellationToken, completionOption: completionOption).ReceiveXElementsFromXPath(expression, resolver);
- private static string GetMediaType(this IHttpSettingsContainer request)
+ private static string GetMediaType(this IHeadersContainer request)
{
+ const string defaultDediaType = "application/xml";
+
var acceptHeaders = request.Headers
.Where(x => x.Name == "Accept")
.ToList();
- if (!acceptHeaders.Any() || acceptHeaders.All(x => x.Value == null))
+ if (acceptHeaders.Count == 0 || acceptHeaders.All(x => x.Value == null))
{
// no accepted media type present, return default
- return "application/xml";
+ return defaultDediaType;
}
// return media type of first accepted media type containing "xml", else of first accepted media type
@@ -97,10 +84,27 @@ private static string GetMediaType(this IHttpSettingsContainer request)
.Select(x => x.Trim())
.ToList();
- return mediaTypes.FirstOrDefault(x => x.IndexOf("xml", StringComparison.OrdinalIgnoreCase) >= 0)
+ string? result = mediaTypes.FirstOrDefault(x => x.Contains("xml", StringComparison.OrdinalIgnoreCase))
?? mediaTypes.FirstOrDefault();
+
+ return result ?? defaultDediaType;
}
+ ///
+ /// Sends an asynchronous GET request.
+ ///
+ ///
+ /// The request.
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. Optional.
+ /// The HttpCompletionOption used in the request. Optional.
+ ///
+ /// A Task whose result is the XML response body deserialized to an object of type T.
+ ///
+ public static Task GetXmlAsync(this IFlurlRequest request,
+ HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead,
+ CancellationToken cancellationToken = default
+ ) => request.SendAsync(HttpMethod.Get, null, cancellationToken: cancellationToken, completionOption: completionOption).ReceiveXml();
+
///
/// Sends an asynchronous HTTP request.
///
@@ -112,11 +116,15 @@ private static string GetMediaType(this IHttpSettingsContainer request)
///
/// A Task whose result is the received IFlurlResponse.
///
- public static Task SendXmlAsync(this IFlurlRequest request, HttpMethod httpMethod, object data,
- CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
+ public static Task SendXmlAsync(this IFlurlRequest request,
+ HttpMethod httpMethod,
+ object data,
+ HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead,
+ CancellationToken cancellationToken = default
+ )
{
- var content = new CapturedXmlContent(request.Settings.XmlSerializer().Serialize(data), request.GetMediaType());
- return request.SendAsync(httpMethod, content, cancellationToken, completionOption);
+ var content = new CapturedXmlContent(FlurlHttpSettingsExtensions.XmlSerializer().Serialize(data), request.GetMediaType());
+ return request.SendAsync(httpMethod, content, cancellationToken: cancellationToken, completionOption: completionOption);
}
///
@@ -129,9 +137,11 @@ public static Task SendXmlAsync(this IFlurlRequest request, Http
///
/// A Task whose result is the received IFlurlResponse.
///
- public static Task PostXmlAsync(this IFlurlRequest request, object data,
- CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) =>
- SendXmlAsync(request, HttpMethod.Post, data, cancellationToken, completionOption);
+ public static Task PostXmlAsync(this IFlurlRequest request,
+ object data,
+ HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead,
+ CancellationToken cancellationToken = default
+ ) => SendXmlAsync(request, HttpMethod.Post, data, completionOption, cancellationToken);
///
/// Sends an asynchronous PUT request.
@@ -143,8 +153,10 @@ public static Task PostXmlAsync(this IFlurlRequest request, obje
///
/// A Task whose result is the received IFlurlResponse.
///
- public static Task PutXmlAsync(this IFlurlRequest request, object data,
- CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead) =>
- SendXmlAsync(request, HttpMethod.Put, data, cancellationToken, completionOption);
+ public static Task PutXmlAsync(this IFlurlRequest request,
+ object data,
+ HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead,
+ CancellationToken cancellationToken = default
+ ) => SendXmlAsync(request, HttpMethod.Put, data, completionOption, cancellationToken);
}
}
diff --git a/src/Flurl.Http.Xml/Flurl.Http.Xml.csproj b/src/FlurlX.Http.Xml/FlurlX.Http.Xml.csproj
similarity index 52%
rename from src/Flurl.Http.Xml/Flurl.Http.Xml.csproj
rename to src/FlurlX.Http.Xml/FlurlX.Http.Xml.csproj
index 75469b3..c56e071 100644
--- a/src/Flurl.Http.Xml/Flurl.Http.Xml.csproj
+++ b/src/FlurlX.Http.Xml/FlurlX.Http.Xml.csproj
@@ -1,24 +1,41 @@
- netstandard2.0;netstandard2.1;net461;net472
+ net8.0
false
false
Luk Vermeulen
- https://github.com/lvermeulen/Flurl.Http.Xml/blob/master/LICENSE
- https://github.com/lvermeulen/Flurl.Http.Xml
+ https://github.com/renanaragao/FlurlX.Http.Xml/blob/master/LICENSE
+ https://github.com/renanaragao/FlurlX.Http.Xml
Copyright 2016-2020 by Luk Vermeulen. All rights reserved.
- https://github.com/lvermeulen/Flurl.Http.Xml
+ https://github.com/renanaragao/FlurlX.Http.Xml
git
Flurl;Http;Xml
http://i.imgur.com/llEKpRL.png?1
XML extensions to Flurl.Http
true
true
+ enable
+
+
+
+ 9999
+
+
+
+ 9999
+
+
+
+ 9999
+
+
+
+ 9999
-
+
diff --git a/src/Flurl.Http.Xml/HttpResponseMessageExtensions.cs b/src/FlurlX.Http.Xml/HttpResponseMessageExtensions.cs
similarity index 73%
rename from src/Flurl.Http.Xml/HttpResponseMessageExtensions.cs
rename to src/FlurlX.Http.Xml/HttpResponseMessageExtensions.cs
index ba6a7ff..5440b7b 100644
--- a/src/Flurl.Http.Xml/HttpResponseMessageExtensions.cs
+++ b/src/FlurlX.Http.Xml/HttpResponseMessageExtensions.cs
@@ -1,4 +1,5 @@
-using System;
+using Flurl.Http;
+using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@@ -9,35 +10,37 @@
using System.Xml.Linq;
using System.Xml.XPath;
-namespace Flurl.Http.Xml
+namespace FlurlX.Http.Xml
{
///
/// IFlurlResponseExtensions
///
public static class IFlurlResponseExtensions
{
- private static FlurlCall GetHttpCall(HttpRequestMessage request)
+ private static FlurlCall? GetHttpCall(HttpRequestMessage? request)
{
- if (request?.Properties != null && request.Properties.TryGetValue("FlurlHttpCall", out var obj) && obj is FlurlCall call)
+ if (request?.Options != null && request.Options.TryGetValue(new HttpRequestOptionsKey