Skip to content

Commit

Permalink
com.utilities.rest 1.4.6 (#24)
Browse files Browse the repository at this point in the history
- bump deps
- Log status code as int as well as enum string
  • Loading branch information
StephenHodgson authored Jun 1, 2023
1 parent e01b7e5 commit 784e23c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Runtime/Extensions/HttpResponseMessageExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static async Task<string> ReadAsStringAsync(this HttpResponseMessage resp

if (!response.IsSuccessStatusCode)
{
throw new HttpRequestException($"{methodName} Failed! HTTP status code: {response.StatusCode} | Response body: {responseAsString}");
throw new HttpRequestException($"{methodName} Failed! HTTP status code: [{(int)response.StatusCode}] {response.StatusCode} | Response body: {responseAsString}");
}

if (debug)
Expand All @@ -31,7 +31,7 @@ public static async Task CheckResponseAsync(this HttpResponseMessage response, [
if (!response.IsSuccessStatusCode)
{
var responseAsString = await response.Content.ReadAsStringAsync();
throw new HttpRequestException($"{methodName} Failed! HTTP status code: {response.StatusCode} | Response body: {responseAsString}");
throw new HttpRequestException($"{methodName} Failed! HTTP status code:[{(int)response.StatusCode}] {response.StatusCode} | Response body: {responseAsString}");
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Utilities.Rest",
"description": "This package contains useful RESTful utilities for the Unity Game Engine.",
"keywords": [],
"version": "1.4.5",
"version": "1.4.6",
"unity": "2021.3",
"documentationUrl": "https://github.com/RageAgainstThePixel/com.utilities.rest#documentation",
"changelogUrl": "https://github.com/RageAgainstThePixel/com.utilities.rest/releases",
Expand All @@ -15,13 +15,13 @@
"author": "Stephen Hodgson",
"url": "https://github.com/StephenHodgson",
"dependencies": {
"com.utilities.async": "1.2.3",
"com.utilities.async": "1.3.0",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.modules.unitywebrequestassetbundle": "1.0.0",
"com.unity.modules.unitywebrequestaudio": "1.0.0",
"com.unity.modules.unitywebrequesttexture": "1.0.0",
"com.unity.modules.unitywebrequestwww": "1.0.0",
"com.unity.nuget.newtonsoft-json": "3.2.0"
"com.unity.nuget.newtonsoft-json": "3.2.1"
},
"hideInEditor": true,
"publishConfig": {
Expand Down

0 comments on commit 784e23c

Please sign in to comment.