diff --git a/appveyor.yml b/appveyor.yml
index 22a045e..cbf6f01 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -15,7 +15,7 @@ artifacts:
deploy:
- provider: NuGet
api_key:
- secure: Uft/AgWL0ObDUb6hWLhsftRR1sNhLa5vONUcVa/2KjVAYZApxZD6ckJ+ABFQs3bB
+ secure: yc/gQNTv1/CbW+NYNpSF0SEOAAVVPr96aLb7kWWE764XGrDlG/ijBXyzQ+g6EnFN
skip_symbols: true
artifact: /.*\.nupkg/
on:
diff --git a/src/Flurl.Http.Xml/CapturedXmlContent.cs b/src/Flurl.Http.Xml/CapturedXmlContent.cs
index aaab5a5..dd6e1b0 100644
--- a/src/Flurl.Http.Xml/CapturedXmlContent.cs
+++ b/src/Flurl.Http.Xml/CapturedXmlContent.cs
@@ -1,5 +1,4 @@
-using System.Text;
-using Flurl.Http.Content;
+using Flurl.Http.Content;
namespace Flurl.Http.Xml
{
@@ -14,6 +13,6 @@ public class CapturedXmlContent : CapturedStringContent
///
/// The XML.
/// The media-type.
- public CapturedXmlContent(string xml, string mediaType) : base(xml, Encoding.UTF8, mediaType) { }
+ public CapturedXmlContent(string xml, string mediaType) : base(xml, mediaType) { }
}
}
\ No newline at end of file
diff --git a/src/Flurl.Http.Xml/Flurl.Http.Xml.csproj b/src/Flurl.Http.Xml/Flurl.Http.Xml.csproj
index 38e9637..75469b3 100644
--- a/src/Flurl.Http.Xml/Flurl.Http.Xml.csproj
+++ b/src/Flurl.Http.Xml/Flurl.Http.Xml.csproj
@@ -1,7 +1,7 @@
- net45;netstandard1.4;netstandard2.0;netstandard2.1;net461;net472
+ netstandard2.0;netstandard2.1;net461;net472
false
false
Luk Vermeulen
@@ -18,7 +18,7 @@
-
+
diff --git a/src/Flurl.Http.Xml/FlurlRequestExtensions.cs b/src/Flurl.Http.Xml/FlurlRequestExtensions.cs
index 19afa26..689f51b 100644
--- a/src/Flurl.Http.Xml/FlurlRequestExtensions.cs
+++ b/src/Flurl.Http.Xml/FlurlRequestExtensions.cs
@@ -81,7 +81,7 @@ public static Task> GetXElementsFromXPath(this IFlurlReque
private static string GetMediaType(this IHttpSettingsContainer request)
{
var acceptHeaders = request.Headers
- .Where(x => x.Key == "Accept")
+ .Where(x => x.Name == "Accept")
.ToList();
if (!acceptHeaders.Any() || acceptHeaders.All(x => x.Value == null))
@@ -112,11 +112,11 @@ private static string GetMediaType(this IHttpSettingsContainer request)
///
/// A Task whose result is the received IFlurlResponse.
///
- public static async Task SendXmlAsync(this IFlurlRequest request, HttpMethod httpMethod, object data,
+ public static Task SendXmlAsync(this IFlurlRequest request, HttpMethod httpMethod, object data,
CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
{
var content = new CapturedXmlContent(request.Settings.XmlSerializer().Serialize(data), request.GetMediaType());
- return await request.SendAsync(httpMethod, content, cancellationToken, completionOption);
+ return request.SendAsync(httpMethod, content, cancellationToken, completionOption);
}
///
diff --git a/test/Flurl.Http.Xml.Tests/Flurl.Http.Xml.Tests.csproj b/test/Flurl.Http.Xml.Tests/Flurl.Http.Xml.Tests.csproj
index 50be15a..6e11ae0 100644
--- a/test/Flurl.Http.Xml.Tests/Flurl.Http.Xml.Tests.csproj
+++ b/test/Flurl.Http.Xml.Tests/Flurl.Http.Xml.Tests.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.0
+ netcoreapp3.1
Flurl.Http.Xml.Tests
Flurl.Http.Xml.Tests
true
@@ -12,15 +12,15 @@
-
+
-
-
+
+
-
+
all
runtime; build; native; contentfiles; analyzers