Skip to content

Commit

Permalink
com.utilities.rest 2.4.5 (RageAgainstThePixel#61)
Browse files Browse the repository at this point in the history
- com.utilities.async -> 2.1.2
- com.utilities.extensions - 1.1.15
- updated docs
  • Loading branch information
StephenHodgson committed Dec 31, 2023
1 parent 99687b7 commit 7d0e83b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
13 changes: 13 additions & 0 deletions Documentation~/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Advanced features includes progress notifications, authentication and native mul
- [Get](#get)
- [Post](#post)
- [Server Sent Events](#server-sent-events)
- [Data Received Callbacks](#data-received-callbacks)
- [Put](#put)
- [Patch](#patch)
- [Delete](#delete)
Expand Down Expand Up @@ -109,6 +110,18 @@ var response = await Rest.PostAsync("www.your.api/endpoint", jsonData, eventData
response.Validate(debug: true);
```

#### Data Received Callbacks

```csharp
var jsonData = "{\"data\":\"content\"}";
var response = await Rest.PostAsync("www.your.api/endpoint", jsonData, dataReceivedEventCallback => {
// eventCallback type is Rest.Response
Debug.Log(dataReceivedEventCallback.Body);
});
// Validates the response for you and will throw a RestException if the response is unsuccessful.
response.Validate(debug: true);
```

### Put

```csharp
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": "2.4.4",
"version": "2.4.5",
"unity": "2021.3",
"documentationUrl": "https://github.com/RageAgainstThePixel/com.utilities.rest#documentation",
"changelogUrl": "https://github.com/RageAgainstThePixel/com.utilities.rest/releases",
Expand All @@ -15,8 +15,8 @@
"author": "Stephen Hodgson",
"url": "https://github.com/StephenHodgson",
"dependencies": {
"com.utilities.async": "2.1.1",
"com.utilities.extensions": "1.1.14",
"com.utilities.async": "2.1.2",
"com.utilities.extensions": "1.1.15",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.modules.unitywebrequestassetbundle": "1.0.0",
"com.unity.modules.unitywebrequestaudio": "1.0.0",
Expand Down

0 comments on commit 7d0e83b

Please sign in to comment.