Skip to content

Commit

Permalink
Implement for edge SDKs.
Browse files Browse the repository at this point in the history
  • Loading branch information
kinyoklion committed Sep 10, 2024
1 parent 8307b03 commit c23bf45
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/sdk/react-native/src/platform/PlatformRequests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export default class PlatformRequests implements Requests {
getEventSourceCapabilities(): EventSourceCapabilities {
return {
readTimeout: false,
headers: true,
customMethod: true,
headers: false,
customMethod: false,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type {
Options,
Requests,
Response,

Check failure on line 8 in packages/shared/akamai-edgeworker-sdk/src/platform/requests.ts

View workflow job for this annotation

GitHub Actions / build-test-akamai-edgeworker-sdk

Delete `,⏎··EventSourceCapabilities`
EventSourceCapabilities,
} from '@launchdarkly/js-server-sdk-common';

class NoopResponse implements Response {
Expand Down Expand Up @@ -41,4 +42,12 @@ export default class EdgeRequests implements Requests {
createEventSource(url: string, eventSourceInitDict: EventSourceInitDict): EventSource {
return new NullEventSource(url, eventSourceInitDict);
}

getEventSourceCapabilities(): EventSourceCapabilities {
return {
readTimeout: false,
headers: false,
customMethod: false,
};
}
}
9 changes: 9 additions & 0 deletions packages/shared/sdk-server-edge/src/platform/requests.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { NullEventSource } from '@launchdarkly/js-server-sdk-common';
import type {
EventSource,
EventSourceCapabilities,
EventSourceInitDict,
Options,
Requests,
Expand All @@ -16,4 +17,12 @@ export default class EdgeRequests implements Requests {
createEventSource(url: string, eventSourceInitDict: EventSourceInitDict): EventSource {
return new NullEventSource(url, eventSourceInitDict);
}

getEventSourceCapabilities(): EventSourceCapabilities {
return {
readTimeout: false,
headers: false,
customMethod: false,
};
}
}

0 comments on commit c23bf45

Please sign in to comment.