Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions MessageBird/MessageBird.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net40;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net45;net40;netstandard2.0</TargetFrameworks>
<Product>MessageBird</Product>
<Title>MessageBird</Title>
<Company>MessageBird</Company>
Expand All @@ -19,4 +19,4 @@
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
</ItemGroup>
</Project>
</Project>
3 changes: 3 additions & 0 deletions MessageBird/Net/RestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ private HttpWebRequest PrepareRequest(string method, string requestUriString, st
// TODO: ##jwp; need to find out why .NET 4.0 under VS2013 refuses to recognize `WebRequest.CreateHttp`.
// HttpWebRequest request = WebRequest.CreateHttp(uri);
var request = WebRequest.Create(uri) as HttpWebRequest;
#if NET45
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
#endif
request.UserAgent = UserAgent;
const string ApplicationJsonContentType = "application/json"; // http://tools.ietf.org/html/rfc4627
request.Accept = ApplicationJsonContentType;
Expand Down