Skip to content

Commit

Permalink
fix: specify transport in fewer places to let config control (#1614)
Browse files Browse the repository at this point in the history
* fix: specify transport in fewer places to let config control

* fix
  • Loading branch information
pauldambra authored Dec 17, 2024
1 parent ddd8903 commit f87ef93
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/__tests__/featureflags.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,6 @@ describe('featureflags', () => {
expect(instance._send_request).toHaveBeenCalledWith({
url: 'https://us.i.posthog.com/api/early_access_features/?token=random fake token',
method: 'GET',
transport: 'fetch',
callback: expect.any(Function),
})
expect(instance._send_request).toHaveBeenCalledTimes(1)
Expand Down Expand Up @@ -507,7 +506,6 @@ describe('featureflags', () => {
url: 'https://us.i.posthog.com/api/early_access_features/?token=random fake token',
method: 'GET',
callback: expect.any(Function),
transport: 'fetch',
})
expect(instance._send_request).toHaveBeenCalledTimes(1)

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

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

0 comments on commit f87ef93

Please sign in to comment.