Skip to content

uni-flow 公开 API(中文注解)


uni-flow 公开 API(中文注解) / createHttpAdapter

Function: createHttpAdapter()

createHttpAdapter(config): HttpAdapter

Defined in: adapters/http-adapter.ts:136

创建 HttpAdapter,用于 YAML bindings / registry 中的 HTTP Unit。

Parameters

config

HttpAdapterConfig

必填 endpoint,可选 headers / fetchFn

Returns

HttpAdapter

HTTP RuntimeAdapter 实例

Example

ts
import { createHttpAdapter } from 'uni-flow';

const child = createHttpAdapter({
  endpoint: 'http://localhost:4001/execute',
  headers: { Authorization: 'Bearer demo' },
});

MIT Licensed