Vangogh is a lightweight and fluent HTTP request helper for Unity built on top of UnityWebRequest.
It focuses on minimal syntax, chainable configuration, and simple async workflows using coroutines.
Project by NyanHeavy Studios
Inspired by Davinci by Shamsdev.
- Simple fluent builder syntax
- Built on Unity's native
UnityWebRequest - GET / POST support
- Custom headers
- Automatic retry system
- Single-instance request protection
- Optional logging
- Callback-based results
- Coroutine-based async execution
- No external dependencies
- Copy
Vangogh.csinto your Unity project (recommended folder):
Assets/
Scripts/
Vangogh/
Vangogh.cs
- Unity will compile automatically.
No additional setup is required.
using NyanHeavyStudios.Vangogh;
Vangogh.GET("https://api.example.com/data")
.OnResult(res =>
{
Debug.Log(res.result);
})
.Init();Vangogh.POST("https://api.example.com/login")
.SetBody("{\"user\":\"admin\",\"password\":\"123\"}")
.OnResult(res =>
{
Debug.Log(res.result);
})
.Init();Vangogh.POST("https://api.example.com/data")
.SetBody("{\"value\":10}")
.SetContentType("application/json")
.AddHeader("Authorization", "Bearer TOKEN")
.SetAttempts(3, 1f)
.SetLog(true)
.UseSingleInstance()
.OnStart(() => Debug.Log("Request started"))
.OnSuccess(() => Debug.Log("Success"))
.OnError(() => Debug.Log("Error"))
.OnEnd(() => Debug.Log("Finished"))
.OnResult(res =>
{
Debug.Log(res.code);
Debug.Log(res.result);
})
.Init();Vangogh.GET(url)
Vangogh.POST(url)| Method | Description |
|---|---|
SetBody(string) |
Defines request body |
SetContentType(string) |
Sets Content-Type header |
AddHeader(key,value) |
Adds custom header |
SetAttempts(count, delay) |
Retry system |
UseSingleInstance() |
Prevent duplicate calls |
SetLog(bool) |
Enable logging |
| Event | Description |
|---|---|
OnStart() |
Called when request begins |
OnSuccess() |
Called on HTTP success |
OnError() |
Called when request fails |
OnEnd() |
Always called at end |
OnResult() |
Returns response data |
public class VangoghResponse
{
public long code;
public string result;
}.OnResult(res =>
{
if(res.code == 200)
Debug.Log(res.result);
})UseSingleInstance()cancels previous active requests with the same URL.SetAttempts()retries on connection failure.- All requests run internally via a persistent
DontDestroyOnLoadmanager.
- Standalone Builds ✔
- Android ✔
- iOS (Why not?)
- WebGl ✔
Vangogh structure based on:
- Davinci Image Downloader by ShamsDev
Vangogh is available under the MIT license. See the LICENSE file for more info.