跳到主要内容

HttpAuthHook

type HttpAuthHook = () =>
| Record<string, string>
| Promise<Record<string, string>>;

Defined in: packages/rxdb-adapter-http/src/http.interface.ts:254

auth hook:注入 token / header。

Returns​

| Record<string, string> | Promise<Record<string, string>>

Remarks​

由适配器在发请求前调用,因此「hook 抛错则请求不发出」可由本包担保(AC#16)。 本包不内置 OAuth 流程。