Skip to content

Commit

Permalink
Merge pull request #130 from tmenier/dev
Browse files Browse the repository at this point in the history
Release fix for #128
  • Loading branch information
tmenier authored Sep 12, 2016
2 parents bd8fabd + 5d11f21 commit 2f41f0d
Show file tree
Hide file tree
Showing 14 changed files with 98 additions and 36 deletions.
21 changes: 11 additions & 10 deletions Build/nuspec/Flurl.Http.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Flurl.Http</id>
<version>1.0.1</version>
<version>1.0.2</version>
<title>Flurl.Http</title>
<authors>Todd Menier</authors>
<projectUrl>http://tmenier.github.io/Flurl</projectUrl>
Expand All @@ -13,6 +13,7 @@
A fluent, portable, testable HTTP client library that extends Flurl's URL builder chain.
</description>
<releaseNotes>
1.0.2 - Updated Flurl dependency to 2.2.1 https://www.nuget.org/packages/Flurl/2.2.1
1.0.1 - Updated Flurl dependency to 2.2 https://www.nuget.org/packages/Flurl/2.2.0
1.0.0 - Many updates and new features: https://github.com/tmenier/Flurl/releases/tag/Flurl.Http.1.0.0
0.10.1 - DLL version fix (github #90)
Expand Down Expand Up @@ -45,62 +46,62 @@
<dependencies>
<group targetFramework="net45">
<dependency id="Newtonsoft.Json" version="9.0.1" />
<dependency id="Flurl" version="2.2.0" />
<dependency id="Flurl" version="2.2.1" />
</group>
<group targetFramework="net461">
<dependency id="Newtonsoft.Json" version="9.0.1" />
<dependency id="Flurl" version="2.2.0" />
<dependency id="Flurl" version="2.2.1" />
<dependency id="System.IO.FileSystem" version="4.0.1" />
<dependency id="System.Net.Http" version="4.1.0" />
<dependency id="System.Text.Encoding.CodePages" version="4.0.1" />
</group>
<group targetFramework="monoandroid">
<dependency id="Newtonsoft.Json" version="9.0.1" />
<dependency id="Flurl" version="2.2.0" />
<dependency id="Flurl" version="2.2.1" />
<dependency id="Microsoft.Bcl.Async" version="1.0.168" />
<dependency id="Microsoft.Bcl.Build" version="1.0.21" />
<dependency id="Microsoft.Net.Http" version="2.2.29" />
<dependency id="PCLStorage" version="1.0.2" />
</group>
<group targetFramework="monotouch">
<dependency id="Newtonsoft.Json" version="9.0.1" />
<dependency id="Flurl" version="2.2.0" />
<dependency id="Flurl" version="2.2.1" />
<dependency id="Microsoft.Bcl.Async" version="1.0.168" />
<dependency id="Microsoft.Bcl.Build" version="1.0.21" />
<dependency id="Microsoft.Net.Http" version="2.2.29" />
<dependency id="PCLStorage" version="1.0.2" />
</group>
<group targetFramework="xamarin.ios">
<dependency id="Newtonsoft.Json" version="9.0.1" />
<dependency id="Flurl" version="2.2.0" />
<dependency id="Flurl" version="2.2.1" />
<dependency id="Microsoft.Bcl.Async" version="1.0.168" />
<dependency id="Microsoft.Bcl.Build" version="1.0.21" />
<dependency id="Microsoft.Net.Http" version="2.2.29" />
<dependency id="PCLStorage" version="1.0.2" />
</group>
<group targetFramework="xamarin.mac">
<dependency id="Newtonsoft.Json" version="9.0.1" />
<dependency id="Flurl" version="2.2.0" />
<dependency id="Flurl" version="2.2.1" />
<dependency id="Microsoft.Bcl.Async" version="1.0.168" />
<dependency id="Microsoft.Bcl.Build" version="1.0.21" />
<dependency id="Microsoft.Net.Http" version="2.2.29" />
<dependency id="PCLStorage" version="1.0.2" />
</group>
<group targetFramework="portable40-net45+sl5+win8+wp8+wpa81">
<dependency id="Newtonsoft.Json" version="9.0.1" />
<dependency id="Flurl" version="2.2.0" />
<dependency id="Flurl" version="2.2.1" />
<dependency id="Microsoft.Bcl.Async" version="1.0.168" />
<dependency id="Microsoft.Bcl.Build" version="1.0.21" />
<dependency id="Microsoft.Net.Http" version="2.2.29" />
<dependency id="PCLStorage" version="1.0.2" />
</group>
<group targetFramework="uap10">
<dependency id="Newtonsoft.Json" version="9.0.1" />
<dependency id="Flurl" version="2.2.0" />
<dependency id="Flurl" version="2.2.1" />
</group>
<group targetFramework="netstandard1.4">
<dependency id="Newtonsoft.Json" version="9.0.1" />
<dependency id="Flurl" version="2.2.0" />
<dependency id="Flurl" version="2.2.1" />
<dependency id="System.IO.FileSystem" version="4.0.1" />
<dependency id="System.Net.Http" version="4.1.0" />
<dependency id="System.Text.Encoding.CodePages" version="4.0.1" />
Expand Down
10 changes: 8 additions & 2 deletions Build/nuspec/Flurl.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Flurl</id>
<version>2.2.0</version>
<version>2.2.1</version>
<title>Flurl</title>
<authors>Todd Menier</authors>
<projectUrl>http://tmenier.github.io/Flurl</projectUrl>
Expand All @@ -13,6 +13,7 @@
A fluent, portable URL builder. To make HTTP calls off the fluent chain, check out Flurl.Http.
</description>
<releaseNotes>
2.2.1 - Fix net461 target (github #128)
2.2.0 - Url.Combine enhancements, broader PCL support https://github.com/tmenier/Flurl/releases/tag/Flurl.2.2.0
2.1.0 - .NET Core 1.0.0 support. Target .NET Platform Standard 1.4
2.0.0 - BREAKING CHANGES: https://github.com/tmenier/Flurl/wiki/Release-Notes
Expand All @@ -37,6 +38,11 @@
<tags>fluent portable url uri querystring builder</tags>
<dependencies>
<group targetFramework="net40" />
<group targetFramework="net461">
<dependency id="System.Globalization" version="4.0.11" />
<dependency id="System.Linq" version="4.1.0" />
<dependency id="System.Reflection.TypeExtensions" version="4.1.0" />
</group>
<group targetFramework="win8" />
<group targetFramework="wpa81" />
<group targetFramework="xamarin.ios" />
Expand All @@ -46,7 +52,7 @@
<group targetFramework="uap10" />
<group targetFramework="portable40-net40+sl5+win8+wp8+wpa81" />
<group targetFramework="netstandard1.4">
<dependency id="System.Globalization.Calendars" version="4.0.1" />
<dependency id="System.Globalization" version="4.0.11" />
<dependency id="System.Linq" version="4.1.0" />
<dependency id="System.Reflection.TypeExtensions" version="4.1.0" />
</group>
Expand Down
8 changes: 4 additions & 4 deletions PackageTesters/PackageTester.NET45/PackageTester.NET45.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Flurl, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Flurl.2.2.0\lib\portable40-net40+sl5+win8+wp8+wpa81\Flurl.dll</HintPath>
<Reference Include="Flurl, Version=2.2.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Flurl.2.2.1\lib\portable40-net40+sl5+win8+wp8+wpa81\Flurl.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Flurl.Http, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Flurl.Http.1.0.1\lib\net45\Flurl.Http.dll</HintPath>
<Reference Include="Flurl.Http, Version=1.0.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Flurl.Http.1.0.2\lib\net45\Flurl.Http.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
Expand Down
4 changes: 2 additions & 2 deletions PackageTesters/PackageTester.NET45/packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Flurl" version="2.2.0" targetFramework="net45" />
<package id="Flurl.Http" version="1.0.1" targetFramework="net45" />
<package id="Flurl" version="2.2.1" targetFramework="net45" />
<package id="Flurl.Http" version="1.0.2" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net45" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net45" />
Expand Down
17 changes: 13 additions & 4 deletions PackageTesters/PackageTester.NET461/PackageTester.NET461.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Flurl, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Flurl.2.2.0\lib\netstandard1.4\Flurl.dll</HintPath>
<Reference Include="Flurl, Version=2.2.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Flurl.2.2.1\lib\netstandard1.4\Flurl.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Flurl.Http, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Flurl.Http.1.0.1\lib\net45\Flurl.Http.dll</HintPath>
<Reference Include="Flurl.Http, Version=1.0.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Flurl.Http.1.0.2\lib\net45\Flurl.Http.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Win32.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Win32.Primitives.4.0.1\lib\net46\Microsoft.Win32.Primitives.dll</HintPath>
<Private>True</Private>
Expand All @@ -56,6 +57,10 @@
<HintPath>..\..\packages\System.Diagnostics.DiagnosticSource.4.0.0\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Globalization.Calendars, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Globalization.Calendars.4.0.1\lib\net46\System.Globalization.Calendars.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.IO.FileSystem, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.IO.FileSystem.4.0.1\lib\net46\System.IO.FileSystem.dll</HintPath>
<Private>True</Private>
Expand All @@ -68,6 +73,10 @@
<HintPath>..\..\packages\System.Net.Http.4.1.0\lib\net46\System.Net.Http.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Reflection.TypeExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Reflection.TypeExtensions.4.1.0\lib\net46\System.Reflection.TypeExtensions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Security.Cryptography.Algorithms.4.2.0\lib\net461\System.Security.Cryptography.Algorithms.dll</HintPath>
<Private>True</Private>
Expand Down
7 changes: 5 additions & 2 deletions PackageTesters/PackageTester.NET461/packages.config
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Flurl" version="2.2.0" targetFramework="net461" />
<package id="Flurl.Http" version="1.0.1" targetFramework="net461" />
<package id="Flurl" version="2.2.1" targetFramework="net461" />
<package id="Flurl.Http" version="1.0.2" targetFramework="net461" />
<package id="Microsoft.Win32.Primitives" version="4.0.1" targetFramework="net461" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net461" />
<package id="System.Diagnostics.DiagnosticSource" version="4.0.0" targetFramework="net461" />
<package id="System.Globalization.Calendars" version="4.0.1" targetFramework="net461" />
<package id="System.IO.FileSystem" version="4.0.1" targetFramework="net461" />
<package id="System.IO.FileSystem.Primitives" version="4.0.1" targetFramework="net461" />
<package id="System.Linq" version="4.1.0" targetFramework="net461" />
<package id="System.Net.Http" version="4.1.0" targetFramework="net461" />
<package id="System.Reflection.TypeExtensions" version="4.1.0" targetFramework="net461" />
<package id="System.Security.Cryptography.Algorithms" version="4.2.0" targetFramework="net461" />
<package id="System.Security.Cryptography.Encoding" version="4.0.0" targetFramework="net461" />
<package id="System.Security.Cryptography.Primitives" version="4.0.0" targetFramework="net461" />
Expand Down
2 changes: 1 addition & 1 deletion PackageTesters/PackageTester.NETCore/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}
},
"dependencies": {
"Flurl.Http": "1.0.1"
"Flurl.Http": "1.0.2"
},
"frameworks": {
"netcoreapp1.0": {
Expand Down
8 changes: 4 additions & 4 deletions PackageTesters/PackageTester.PCL/PackageTester.PCL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@
</None>
</ItemGroup>
<ItemGroup>
<Reference Include="Flurl, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Flurl.2.2.0\lib\portable40-net40+sl5+win8+wp8+wpa81\Flurl.dll</HintPath>
<Reference Include="Flurl, Version=2.2.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Flurl.2.2.1\lib\portable40-net40+sl5+win8+wp8+wpa81\Flurl.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Flurl.Http, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Flurl.Http.1.0.1\lib\portable40-net45+sl5+win8+wp8+wpa81\Flurl.Http.dll</HintPath>
<Reference Include="Flurl.Http, Version=1.0.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Flurl.Http.1.0.2\lib\portable40-net45+sl5+win8+wp8+wpa81\Flurl.Http.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
Expand Down
4 changes: 2 additions & 2 deletions PackageTesters/PackageTester.PCL/packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Flurl" version="2.2.0" targetFramework="portable40-net45+sl5+win8+wp8+wpa81" />
<package id="Flurl.Http" version="1.0.1" targetFramework="portable40-net45+sl5+win8+wp8+wpa81" />
<package id="Flurl" version="2.2.1" targetFramework="portable40-net45+sl5+win8+wp8+wpa81" />
<package id="Flurl.Http" version="1.0.2" targetFramework="portable40-net45+sl5+win8+wp8+wpa81" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="portable40-net45+sl5+win8+wp8+wpa81" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="portable40-net45+sl5+win8+wp8+wpa81" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="portable40-net45+sl5+win8+wp8+wpa81" />
Expand Down
20 changes: 20 additions & 0 deletions PackageTesters/PackageTester.Shared/Tester.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Threading.Tasks;
using Flurl;
using Flurl.Http;
using Flurl.Http.Testing;

Expand All @@ -17,9 +18,28 @@ public async Task DoTestsAsync(Action<string> log) {
log("^-- fake response");
}

// Reproduce https://github.com/tmenier/Flurl/issues/128
using (var test = new HttpTest()) {
test.RespondWithJson(new TestResponse { TestString = "Test string" });

var response = new Url("http://www.google.com")
.WithBasicAuth("test_username", "test_secret")
.PostUrlEncodedAsync(new { test = "" })
.ReceiveJson<TestResponse>()
.Result;

log(response.TestString);
log("^-- fake response https://github.com/tmenier/Flurl/issues/128");
}

var path = await "http://www.google.com".DownloadFileAsync("c:\\", "google.txt");
log("dowloaded google source to " + path);
log("done");
}
}

internal class TestResponse
{
public string TestString { get; set; }
}
}
2 changes: 1 addition & 1 deletion Test/Flurl.Test.NETCore/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},

"dependencies": {
"dotnet-test-nunit": "3.4.0-beta-1",
"dotnet-test-nunit": "3.4.0-beta-2",
"Flurl.Http": { "target": "project" },
"NUnit": "3.4.1"
},
Expand Down
23 changes: 23 additions & 0 deletions Test/Flurl.Test.Shared/Http/RealHttpTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,5 +185,28 @@ public async Task supports_quoted_charset() {
StringAssert.StartsWith("{", s);
StringAssert.EndsWith("}", s);
}

[Test]
public async Task can_handle_error() {
var handlerCalled = false;

FlurlHttp.Configure(c => {
c.OnError = call => {
call.ExceptionHandled = true;
handlerCalled = true;
};
});

try {
await "https://httpbin.org/status/500".GetAsync();
Assert.IsTrue(handlerCalled, "error handler shoule have been called.");
}
catch (FlurlHttpException) {
Assert.Fail("exception should have been supressed.");
}
finally {
FlurlHttp.Configure(c => c.ResetDefaults());
}
}
}
}
4 changes: 2 additions & 2 deletions src/Flurl.Http/project.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"title": "Flurl.Http",
"version": "1.0.1",
"version": "1.0.2",

"dependencies": {
"Flurl": "2.2.0",
"Flurl": "2.2.1",
"Newtonsoft.Json": "9.0.1"
},

Expand Down
4 changes: 2 additions & 2 deletions src/Flurl/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "Flurl",
"version": "2.2.0",
"version": "2.2.1",

"buildOptions": {
"compile": {
Expand Down Expand Up @@ -28,7 +28,7 @@
},
"netstandard1.4": {
"dependencies": {
"System.Globalization.Calendars": "4.0.1",
"System.Globalization": "4.0.11",
"System.Linq": "4.1.0",
"System.Reflection.TypeExtensions": "4.1.0"
}
Expand Down

0 comments on commit 2f41f0d

Please sign in to comment.