Skip to content

Commit 664296d

Browse files
committed
support custom http client
1 parent 7e4e12b commit 664296d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: gusto_embedded/src/CompanyAuthenticatedClient.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function CompanyAuthenticatedClient({
2828
const authUrl = constructAuthUrl(options);
2929
const tokenStore = new InMemoryTokenStore();
3030

31-
const httpClientWithTokenRefresh = new HTTPClient();
31+
const httpClientWithTokenRefresh = options.httpClient ?? new HTTPClient();
3232

3333
httpClientWithTokenRefresh.addHook("response", async (res) => {
3434
if (res.status === 401) {

0 commit comments

Comments
 (0)