@bluelibs/runner - v6.3.1
    Preparing search index...

    Function createHttpClient

    • Creates a platform-neutral HTTP client for Runner task and event exposure.

      Use this client in browser or universal code paths. When you need Node-native streaming or multipart file support, switch to the Node entrypoint clients.

      The impact of choosing this client is portability: the same call site works in browser-oriented environments, but raw Node streams are intentionally rejected so unsupported transport behavior fails fast.

      Parameters

      Returns HttpClient

      import { Serializer, createHttpClient } from "@bluelibs/runner";

      const client = createHttpClient({
      baseUrl: "https://api.example.com",
      serializer: new Serializer(),
      });

      const user = await client.task("getUser", { id: "u1" });