Skip to content

Commit b4a23c6

Browse files
authored
Fix Fetch API implementation (#1801)
1 parent 67133df commit b4a23c6

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

dwds/debug_extension_mv3/web/web_api.dart

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Future<FetchResponse> fetchRequest(String resourceUrl) async {
3131
try {
3232
final options = FetchOptions(
3333
method: 'GET',
34-
credentialsOptions: CredentialsOptions(credentials: 'include'),
34+
credentials: 'include',
3535
);
3636
final response =
3737
await promiseToFuture(_nativeJsFetch(resourceUrl, options));
@@ -51,14 +51,6 @@ Future<FetchResponse> fetchRequest(String resourceUrl) async {
5151
class FetchOptions {
5252
external factory FetchOptions({
5353
required String method, // e.g., 'GET', 'POST'
54-
required CredentialsOptions credentialsOptions,
55-
});
56-
}
57-
58-
@JS()
59-
@anonymous
60-
class CredentialsOptions {
61-
external factory CredentialsOptions({
6254
required String credentials, // e.g., 'omit', 'same-origin', 'include'
6355
});
6456
}

0 commit comments

Comments
 (0)