Updating targeting to 4.7.1 and forcing TLS 1.2

This commit is contained in:
dbrownems
2022-07-13 11:30:11 -05:00
parent 0eed8a78b6
commit 4720aa94be
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -9,10 +9,16 @@ using System.Threading;
/// </summary>
public partial class Curl
{
static Curl()
{
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
}
[SqlFunction]
[return: SqlFacet(MaxSize = -1)]
public static SqlChars Get(SqlChars H, SqlChars url)
{
var client = new WebClient();
AddHeader(H, client);
return new SqlChars(
@@ -24,6 +30,7 @@ public partial class Curl
[SqlProcedure]
public static void Post(SqlChars H, SqlChars d, SqlChars url)
{
var client = new WebClient();
AddHeader(H, client);
if (d.IsNull)
@@ -39,6 +46,7 @@ public partial class Curl
[SqlProcedure]
public static void PostWithRetry(SqlChars H, SqlChars d, SqlChars url)
{
var client = new WebClient();
AddHeader(H, client);
if (d.IsNull)
@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SqlClr</RootNamespace>
<AssemblyName>SqlClrCurl</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>