Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ApiClientConfigurator: getCustomMiddleware #1

Merged
merged 7 commits into from
Nov 28, 2024

Conversation

nicolasmondain
Copy link
Collaborator

ApiClientConfigurator.getMiddleware is now using:

  • this.getHeaderMiddleware
  • this.getHttpAgentMiddleware
  • this.getCustomMiddleware
nicolasmondain@MBP-de-Nicolas hubspot-api-nodejs % npm run test          

> @hubspot/[email protected] test
> ts-node node_modules/jasmine/bin/jasmine --config=jasmine.json

Randomized with seed 63752
Started
......................................................................


70 specs, 0 failures
Finished in 0.081 seconds
Randomized with seed 63752 (jasmine --random=true --seed=63752)
new Client({
    accessToken: ACCESS_TOKEN,
    middleware: [{
        async pre(ctx) {
            await new Promise(resolve => setTimeout(resolve, 1000));
            return ctx;
        },
        async post(ctx) {
            await new Promise(resolve => setTimeout(resolve, 1000));
            return ctx;
        },
    }],
});

@nicolasmondain nicolasmondain merged commit 6558fd0 into l3mpire:master Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant