{"id":24351052,"url":"https://github.com/nyanheavy/vangogh","last_synced_at":"2026-04-21T17:32:26.546Z","repository":{"id":251679225,"uuid":"838083494","full_name":"NyanHeavy/Vangogh","owner":"NyanHeavy","description":"Simple API Webrequest system for Unity","archived":false,"fork":false,"pushed_at":"2025-01-13T14:07:41.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T14:57:00.365Z","etag":null,"topics":["cs","csharp","unity","unity-networking","unity-webrequest","unity3d","vangogh"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NyanHeavy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-04T22:18:48.000Z","updated_at":"2025-01-13T14:07:44.000Z","dependencies_parsed_at":"2024-08-11T00:24:47.085Z","dependency_job_id":null,"html_url":"https://github.com/NyanHeavy/Vangogh","commit_stats":null,"previous_names":["nyanheavy/vangogh"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NyanHeavy%2FVangogh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NyanHeavy%2FVangogh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NyanHeavy%2FVangogh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NyanHeavy%2FVangogh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NyanHeavy","download_url":"https://codeload.github.com/NyanHeavy/Vangogh/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243159171,"owners_count":20245675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cs","csharp","unity","unity-networking","unity-webrequest","unity3d","vangogh"],"created_at":"2025-01-18T14:57:02.110Z","updated_at":"2026-04-21T17:32:26.538Z","avatar_url":"https://github.com/NyanHeavy.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vangogh - Simple WebRequest System for Unity\n\n**Vangogh** is a lightweight and fluent HTTP request helper for Unity built on top of `UnityWebRequest`.  \nIt focuses on **minimal syntax**, **chainable configuration**, and **simple async workflows** using coroutines.\n\nProject by **NyanHeavy Studios**  \nInspired by **Davinci** by Shamsdev.\n\n## Features\n\n- Simple **fluent builder syntax**\n- Built on Unity's native `UnityWebRequest`\n- **GET / POST** support\n- **Custom headers**\n- **Automatic retry system**\n- **Single-instance request protection**\n- Optional **logging**\n- **Callback-based results**\n- **Coroutine-based async execution**\n- **No external dependencies**\n\n## Installation\n\n1. Copy `Vangogh.cs` into your Unity project (recommended folder):\n\n```\nAssets/\n  Scripts/\n    Vangogh/\n      Vangogh.cs\n```\n\n2. Unity will compile automatically.\n\nNo additional setup is required.\n\n## Basic Usage\n\n### Simple GET\n\n```csharp\nusing NyanHeavyStudios.Vangogh;\n\nVangogh.GET(\"https://api.example.com/data\")\n    .OnResult(res =\u003e\n    {\n        Debug.Log(res.result);\n    })\n    .Init();\n```\n\n### Simple POST\n\n```csharp\nVangogh.POST(\"https://api.example.com/login\")\n    .SetBody(\"{\\\"user\\\":\\\"admin\\\",\\\"password\\\":\\\"123\\\"}\")\n    .OnResult(res =\u003e\n    {\n        Debug.Log(res.result);\n    })\n    .Init();\n```\n\n## Full Example\n\n```csharp\nVangogh.POST(\"https://api.example.com/data\")\n    .SetBody(\"{\\\"value\\\":10}\")\n    .SetContentType(\"application/json\")\n    .AddHeader(\"Authorization\", \"Bearer TOKEN\")\n    .SetAttempts(3, 1f)\n    .SetLog(true)\n    .UseSingleInstance()\n    .OnStart(() =\u003e Debug.Log(\"Request started\"))\n    .OnSuccess(() =\u003e Debug.Log(\"Success\"))\n    .OnError(() =\u003e Debug.Log(\"Error\"))\n    .OnEnd(() =\u003e Debug.Log(\"Finished\"))\n    .OnResult(res =\u003e\n    {\n        Debug.Log(res.code);\n        Debug.Log(res.result);\n    })\n    .Init();\n```\n\n## API Overview\n\n### Request Creation\n\n```csharp\nVangogh.GET(url)\nVangogh.POST(url)\n```\n\n### Configuration\n\n| Method | Description |\n|------|-------------|\n| `SetBody(string)` | Defines request body |\n| `SetContentType(string)` | Sets Content-Type header |\n| `AddHeader(key,value)` | Adds custom header |\n| `SetAttempts(count, delay)` | Retry system |\n| `UseSingleInstance()` | Prevent duplicate calls |\n| `SetLog(bool)` | Enable logging |\n\n### Events\n\n| Event | Description |\n|------|-------------|\n| `OnStart()` | Called when request begins |\n| `OnSuccess()` | Called on HTTP success |\n| `OnError()` | Called when request fails |\n| `OnEnd()` | Always called at end |\n| `OnResult()` | Returns response data |\n\n### Response Object\n\n```csharp\npublic class VangoghResponse\n{\n    public long code;\n    public string result;\n}\n```\n\n## Example Response Handling\n\n```csharp\n.OnResult(res =\u003e\n{\n    if(res.code == 200)\n        Debug.Log(res.result);\n})\n```\n\n## Notes\n\n- `UseSingleInstance()` cancels previous active requests with the same URL.\n- `SetAttempts()` retries on connection failure.\n- All requests run internally via a persistent `DontDestroyOnLoad` manager.\n\n## Supporting Platforms\n- Standalone Builds ✔\n- Android ✔\n- iOS (Why not?)\n- WebGl ✔\n\n## Credits\n\nVangogh structure based on:\n- [Davinci Image Downloader](https://github.com/shamsdev/davinci) by ShamsDev\n\n----\n## License\n**Vangogh** is available under the **MIT** license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyanheavy%2Fvangogh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnyanheavy%2Fvangogh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyanheavy%2Fvangogh/lists"}