Skip to content

Commit

Permalink
Parse response only when DownloadHandler is DownloadHandlerBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
jdnichollsc committed Sep 9, 2019
1 parent 5f1ad4c commit d3001f4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 13 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.5.8] - 2019-09-08
## [2.5.9] - 2019-09-08

### Added
- Add **ParseResponseBody** option to fix severe frame rate drop when parsing large response by [@TigerHix](https://github.com/TigerHix) ([47f8732](https://github.com/proyecto26/RestClient/pull/92/commits/47f8732f3468903779ac85b2dbfbfb12ce7abec1)).
Expand Down Expand Up @@ -130,8 +130,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [...1.0.1]
Missing tags for previous versions 🤷‍♂

[Unreleased]: https://github.com/proyecto26/RestClient/compare/v2.5.8...HEAD
[2.5.8]: https://github.com/proyecto26/RestClient/compare/2.5.7...v2.5.8
[Unreleased]: https://github.com/proyecto26/RestClient/compare/v2.5.9...HEAD
[2.5.9]: https://github.com/proyecto26/RestClient/compare/2.5.7...v2.5.9
[2.5.7]: https://github.com/proyecto26/RestClient/compare/2.5.5...2.5.7
[2.5.5]: https://github.com/proyecto26/RestClient/compare/2.5.4...2.5.5
[2.5.4]: https://github.com/proyecto26/RestClient/compare/2.5.3...2.5.4
Expand Down
8 changes: 1 addition & 7 deletions src/Proyecto26.RestClient/Helpers/Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,7 @@ private static void ConfigureWebRequestWithOptions(UnityWebRequest request, byte
if (options.DownloadHandler is DownloadHandler)
{
request.downloadHandler = options.DownloadHandler;
if (options.DownloadHandler is DownloadHandlerFile
|| options.DownloadHandler is DownloadHandlerTexture
|| options.DownloadHandler is DownloadHandlerAssetBundle
|| options.DownloadHandler is DownloadHandlerAudioClip)
{
options.ParseResponseBody = false;
}
options.ParseResponseBody = (options.DownloadHandler is DownloadHandlerBuffer);
}
else
request.downloadHandler = (DownloadHandler)new DownloadHandlerBuffer();
Expand Down
2 changes: 1 addition & 1 deletion src/Proyecto26.RestClient/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

[assembly: AssemblyVersion ("2.5.8")]
[assembly: AssemblyVersion ("2.5.9")]

// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
Expand Down
2 changes: 1 addition & 1 deletion src/Proyecto26.RestClient/Proyecto26.RestClient.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>Proyecto26.RestClient</id>
<version>2.5.8</version>
<version>2.5.9</version>
<title>RestClient for Unity</title>
<authors>Juan David Nicholls Cardona</authors>
<owners>jdnichollsc</owners>
Expand Down
2 changes: 1 addition & 1 deletion src/Proyecto26.RestClient/RestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Proyecto26
{
/// <summary>
/// RestClient for Unity
/// Version: 2.5.8
/// Version: 2.5.9
/// </summary>
public static partial class RestClient
{
Expand Down

0 comments on commit d3001f4

Please sign in to comment.