diff --git a/src/Proyecto26.RestClient/Properties/AssemblyInfo.cs b/src/Proyecto26.RestClient/Properties/AssemblyInfo.cs index 6128bf1..39941ae 100644 --- a/src/Proyecto26.RestClient/Properties/AssemblyInfo.cs +++ b/src/Proyecto26.RestClient/Properties/AssemblyInfo.cs @@ -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.0.1")] +[assembly: AssemblyVersion ("2.1.0")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/src/Proyecto26.RestClient/Proyecto26.RestClient.nuspec b/src/Proyecto26.RestClient/Proyecto26.RestClient.nuspec index e43bd5c..f4489e9 100644 --- a/src/Proyecto26.RestClient/Proyecto26.RestClient.nuspec +++ b/src/Proyecto26.RestClient/Proyecto26.RestClient.nuspec @@ -2,7 +2,7 @@ Proyecto26.RestClient - 2.0.1 + 2.1.0 RestClient for Unity Juan David Nicholls Cardona jdnichollsc @@ -12,7 +12,7 @@ false Simple HTTP and REST client for Unity based on Promises, also support Callbacks! Add more HTTP methods, handle exceptions and support more options - Copyright ©2017 Proyecto 26 + Copyright ©2018 Proyecto 26 Unity Promises Http Rest http-client HttpClient rest-client RestClient Request diff --git a/src/Proyecto26.RestClient/Utils/Extensions.cs b/src/Proyecto26.RestClient/Utils/Extensions.cs index ae4593a..b64264f 100644 --- a/src/Proyecto26.RestClient/Utils/Extensions.cs +++ b/src/Proyecto26.RestClient/Utils/Extensions.cs @@ -44,7 +44,10 @@ public static IEnumerator SendWebRequest(this UnityWebRequest request, RequestHe request.uploadHandler = (UploadHandler)new UploadHandlerRaw(bodyRaw); request.uploadHandler.contentType = contentType; } - request.downloadHandler = (DownloadHandler)new DownloadHandlerBuffer(); + if (options.DownloadHandler is DownloadHandler) + request.downloadHandler = options.DownloadHandler; + else + request.downloadHandler = (DownloadHandler)new DownloadHandlerBuffer(); request.SetRequestHeader("Content-Type", contentType); foreach (var header in RestClient.DefaultRequestHeaders) { diff --git a/src/Proyecto26.RestClient/Utils/RequestHelper.cs b/src/Proyecto26.RestClient/Utils/RequestHelper.cs index 6a11072..9ebfff5 100644 --- a/src/Proyecto26.RestClient/Utils/RequestHelper.cs +++ b/src/Proyecto26.RestClient/Utils/RequestHelper.cs @@ -70,6 +70,13 @@ public List FormSections set { _formSections = value; } } + private DownloadHandler _downloadHandler; + public DownloadHandler DownloadHandler + { + get { return _downloadHandler; } + set { _downloadHandler = value; } + } + private Dictionary _headers; public Dictionary Headers {