Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #349 from MJMortimer/f-init-params
Browse files Browse the repository at this point in the history
Initialise Parameters property in XeroHttpClient constructor
  • Loading branch information
MJMortimer authored Sep 11, 2018
2 parents 95346f3 + 8481e9a commit e01e013
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CoreTests/ApiWrapperTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ namespace CoreTests
{
public class ApiWrapperTest
{
public ApiWrapperTest()
{
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
}

private IXeroCoreApi _api;

protected Account BankAccount { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion CoreTests/App.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1"/>
</startup>

<appSettings>
Expand Down
4 changes: 3 additions & 1 deletion CoreTests/CoreTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CoreTests</RootNamespace>
<AssemblyName>CoreTests</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<TargetFrameworkProfile />
Expand All @@ -24,6 +24,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>5</LangVersion>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -33,6 +34,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
Expand Down
1 change: 1 addition & 0 deletions Xero.Api/Infrastructure/Http/XeroHttpClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ private XeroHttpClient(IJsonObjectMapper jsonMapper, IXmlObjectMapper xmlMapper)
{
JsonMapper = jsonMapper;
XmlMapper = xmlMapper;
Parameters = new NameValueCollection();
}

public XeroHttpClient(string baseUri, IAuthenticator auth, IConsumer consumer, IUser user,
Expand Down

0 comments on commit e01e013

Please sign in to comment.