Module dmx.fun.http


module dmx.fun.http
java.net.http.HttpClient wrapper for dmx-fun.

Wraps the JDK's built-in HTTP client so that both network failures and HTTP error status codes are surfaced as a single typed Result rather than a mix of exceptions and status-code checks:

DmxHttpClient client = DmxHttpClient.of(HttpClient.newHttpClient());

Result<String, HttpError> result =
    client.send(request, BodyHandlers.ofString());

result
    .peek(body -> System.out.println("OK: " + body))
    .peekError(err -> System.err.println("Failed: " + err));

Error categories — HttpError:

  • Packages

    Exports
    Package
    Description
     
    Indirect Exports
    From
    Packages
  • Modules

    Requires
    Modifier
    Module
    Description
    transitive
    Functional programming constructions for Java.