setCookies method

Future<void> setCookies(
  1. List<CookieParam> cookies, {
  2. BrowserContextID? browserContextId,
})

Sets given cookies. cookies Cookies to be set. browserContextId Browser context to use when called on the browser endpoint.

Implementation

Future<void> setCookies(
  List<network.CookieParam> cookies, {
  browser.BrowserContextID? browserContextId,
}) async {
  await _client.send('Storage.setCookies', {
    'cookies': [...cookies],
    if (browserContextId != null) 'browserContextId': browserContextId,
  });
}