Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
benjackwhite committed Dec 17, 2024
1 parent 6518391 commit 02fbcfb
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/__tests__/featureflags.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ describe('featureflags', () => {
expect(instance._send_request).toHaveBeenCalledWith({
url: 'https://us.i.posthog.com/api/early_access_features/?token=random fake token',
method: 'GET',
transport: 'XHR',
transport: 'fetch',
callback: expect.any(Function),
})
expect(instance._send_request).toHaveBeenCalledTimes(1)
Expand Down Expand Up @@ -507,7 +507,7 @@ describe('featureflags', () => {
url: 'https://us.i.posthog.com/api/early_access_features/?token=random fake token',
method: 'GET',
callback: expect.any(Function),
transport: 'XHR',
transport: 'fetch',
})
expect(instance._send_request).toHaveBeenCalledTimes(1)

Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/surveys.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ describe('surveys', () => {
expect(instance._send_request).toHaveBeenCalledWith({
url: 'https://us.i.posthog.com/api/surveys/?token=testtoken',
method: 'GET',
transport: 'XHR',
transport: 'fetch',
callback: expect.any(Function),
})
expect(instance._send_request).toHaveBeenCalledTimes(1)
Expand Down Expand Up @@ -281,7 +281,7 @@ describe('surveys', () => {
expect(instance._send_request).toHaveBeenCalledWith({
url: 'https://us.i.posthog.com/api/surveys/?token=testtoken',
method: 'GET',
transport: 'XHR',
transport: 'fetch',
callback: expect.any(Function),
})
expect(instance._send_request).toHaveBeenCalledTimes(1)
Expand Down
2 changes: 1 addition & 1 deletion src/posthog-featureflags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ export class PostHogFeatureFlags {

if (!existing_early_access_features || force_reload) {
this.instance._send_request({
transport: 'XHR',
transport: 'fetch',
url: this.instance.requestRouter.endpointFor(
'api',
`/api/early_access_features/?token=${this.instance.config.token}`
Expand Down
2 changes: 1 addition & 1 deletion src/posthog-surveys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export class PostHogSurveys {
`/api/surveys/?token=${this.instance.config.token}`
),
method: 'GET',
transport: 'XHR',
transport: 'fetch',
callback: (response) => {
if (response.statusCode !== 200 || !response.json) {
return callback([])
Expand Down
2 changes: 1 addition & 1 deletion src/web-experiments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export class WebExperiments {
`/api/web_experiments/?token=${this.instance.config.token}`
),
method: 'GET',
transport: 'XHR',
transport: 'fetch',
callback: (response) => {
if (response.statusCode !== 200 || !response.json) {
return callback([])
Expand Down

0 comments on commit 02fbcfb

Please sign in to comment.