Skip to content

Commit

Permalink
fix new obsoletion warning in unity 2019.3
Browse files Browse the repository at this point in the history
UnityWebRequest.chunkedTransfer got marked as a obsolete in unity 2019.3
  • Loading branch information
Stephan Dilly committed Jan 6, 2020
1 parent df44e85 commit 6b8e92d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Proyecto26.RestClient/Helpers/Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ private static void ConfigureWebRequestWithOptions(UnityWebRequest request, byte
{
request.timeout = options.Timeout.Value;
}
#if !UNITY_2019_3_OR_NEWER
if (options.ChunkedTransfer.HasValue)
{
request.chunkedTransfer = options.ChunkedTransfer.Value;
}
#endif
if (options.UseHttpContinue.HasValue)
{
request.useHttpContinue = options.UseHttpContinue.Value;
Expand Down
2 changes: 2 additions & 0 deletions src/Proyecto26.RestClient/Helpers/RequestHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public bool EnableDebug
set { _enableDebug = value; }
}

#if !UNITY_2019_3_OR_NEWER
private bool? _chunkedTransfer;
/// <summary>
/// Indicates whether the UnityWebRequest system should employ the HTTP/1.1 chunked-transfer encoding method.
Expand All @@ -126,6 +127,7 @@ public bool? ChunkedTransfer
get { return _chunkedTransfer; }
set { _chunkedTransfer = value; }
}
#endif

private bool? _useHttpContinue = true;
/// <summary>
Expand Down

0 comments on commit 6b8e92d

Please sign in to comment.