Skip to main content
xyz.refineryteam.refinerycore.api.http.Http is a minimal async HTTP client for plugin-sized needs: update checks, Discord webhooks, REST APIs. Requests run on a dedicated daemon pool — never the common ForkJoinPool and never the main thread — with retry/backoff scheduled through your plugin’s async scheduler.

Quick start

UpdateChecker.java
Call http.close() from onDisable() if you own the instance — safe to skip, since the worker threads are daemons.

Building requests

Start with get(url), post(url), put(url), or delete(url), then configure the fluent Request builder:

Responses

executeAsync() completes with a Response record:
Never call the blocking execute() from the main thread — network latency will freeze the server tick. Use executeAsync() and react in the future’s callback, or hop off the thread first with RefineryScheduler.
For anything heavier — connection pooling tuning, multipart uploads, streaming — reach for a dedicated HTTP library. Http intentionally covers the simple request/response cases well and nothing else.