Skip to content

Commit 709612f

Browse files
authored
Merge pull request #19 from dubit/release_2_2
v2.2.1
2 parents ab2a974 + 9aaa783 commit 709612f

File tree

5 files changed

+30
-6
lines changed

5 files changed

+30
-6
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,16 @@ The Http instance will run the WebRequest coroutines for you so you dont have to
1616
* C# 7
1717

1818
## Installation
19-
It's recommended that you submodule this repo to your Assets directory using:
20-
`git submodule add [email protected]:dubit/unity-http.git Assets/DUCK/Http`
2119

22-
This package is also part of <b>D</b>ubit <b>U</b>nity <b>C</b>omponent <b>K</b>it (<b>DUCK</b>) and can be installed via the [DUCK Package Manager](https://github.com/dubit/duck-package-manager).
20+
Add it as a package using [Unity Package Manager](https://docs.unity3d.com/Manual/upm-git.html) or via submodule:
21+
`git submodule add [email protected]:dubit/unity-http.git Assets/Duck/Http`
22+
23+
## Releasing
24+
* Use [gitflow](https://nvie.com/posts/a-successful-git-branching-model/)
25+
* Create a release branch for the release
26+
* On that branch, bump version number in package json file, any other business (docs/readme updates)
27+
* Merge to master via pull request and tag the merge commit on master.
28+
* Merge back to development.#
2329

2430
## How to use it.
2531
If you are using an AssemblyDefinition then reference the Http Assembly.

Scripts/Service/Unity/UnityHttpRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private void UpdateProgress(ref float currentProgress, float progress, Action<fl
126126
if (currentProgress < progress)
127127
{
128128
currentProgress = progress;
129-
onProgress(downloadProgress);
129+
onProgress?.Invoke(currentProgress);
130130
}
131131
}
132132
}

Scripts/Service/Unity/UnityHttpService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ private static HttpResponse CreateResponse(UnityWebRequest unityWebRequest)
120120
return new HttpResponse
121121
{
122122
Url = unityWebRequest.url,
123-
Bytes = unityWebRequest.downloadHandler.data,
124-
Text = unityWebRequest.downloadHandler.text,
123+
Bytes = unityWebRequest.downloadHandler?.data,
124+
Text = unityWebRequest.downloadHandler?.text,
125125
IsSuccessful = !unityWebRequest.isHttpError && !unityWebRequest.isNetworkError,
126126
IsHttpError = unityWebRequest.isHttpError,
127127
IsNetworkError = unityWebRequest.isNetworkError,

package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "com.dubitlimited.duck.unity-http",
3+
"displayName": "Unity Http",
4+
"version": "2.2.1",
5+
"description": "An improved API for making http requests in unity",
6+
"repository": {
7+
"type": "git",
8+
"url": "https://github.com/dubit/unity-http"
9+
},
10+
"author": "Dubit Limited"
11+
}

package.json.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)