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

RethrownDartError: Bad state: Attempted to send cookies, but XMLHttpRequest does not support them. #103

Open
vinaykharayat opened this issue Sep 3, 2024 · 0 comments

Comments

@vinaykharayat
Copy link

I am getting error
RethrownDartError: Bad state: Attempted to send cookies, but XMLHttpRequest does not support them.

Here is my code

    final controller = WindowController();
    await controller.openHttp(
      method: 'GET',
      uri: Uri.parse(URL),
      onRequest: (HttpClientRequest request) {
        request.cookies.add(Cookie('cookie', 'value'));
        request.cookies.add(Cookie('cookie', 'value'));
      },
      onResponse: (HttpClientResponse response) {
        log('Status code: ${response.statusCode}');
      },
    );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant