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

Make it possible to use node-fetch in HTTPService #35

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
add send data function to core
Tim-53 committed Jun 18, 2023

Verified

This commit was signed with the committer’s verified signature.
erikmd Erik Martin-Dorel
commit 45aed8e9ee276da99041d80302abdc83e5200748
14 changes: 13 additions & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ABBY_AB_STORAGE_PREFIX, ABBY_FF_STORAGE_PREFIX, AbbyDataResponse } from "./shared/";
import { HttpService } from "./shared";
import { HttpService, AbbyEvent, AbbyEventType } from "./shared";
import { F } from "ts-toolbelt";
import { getWeightedRandomVariant } from "./mathHelpers";
import { parseCookies } from "./helpers";
@@ -363,4 +363,16 @@ export class Abby<
}
});
}

sendData({
url,
type,
data,
}: {
url?: string;
type: AbbyEventType;
data: Omit<AbbyEvent, "type">;
}) {
this.httpService.sendData({ url, type, data });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this.httpService.sendData({ url, type, data });
return this.httpService.sendData({ url, type, data });

}
}