Get downloadable unity package here
Simplifies using UnityWebRequest by providing a fluent interface for common API client needs. Some basic examples are included in the example scene which uses a Testing API.
Unity Version | Status |
---|---|
2018.1.3f1 | OK |
Here's some code using API Boss
Request
.Get("https://jsonplaceholder.typicode.com/posts/1")
.OnJsonResponse<JsonResponse>(OnResponse)
.Send();
Request
.Post("https://jsonplaceholder.typicode.com/posts")
.SetJsonPayload(payload)
.OnJsonResponse<JsonResponse>(OnResponse)
.SetHeader("Content-type","application/json; charset=UTF-8")
.Send();
Note: the resource will not be really created on the server but it will be faked as if.
Request
.Put("https://jsonplaceholder.typicode.com/posts/1")
.SetJsonPayload(payload)
.OnJsonResponse<JsonResponse>(OnResponse)
.SetHeader("Content-type","application/json; charset=UTF-8")
.Send();
Note: the resource will not be really updated on the server but it will be faked as if.
Request
.Delete("https://jsonplaceholder.typicode.com/posts/1")
.OnError(Helpers.LogError)
.OnResponse(Helpers.LogResponse)
.Send();
TBD