addCookie

abstract fun addCookie(scope: CoroutineScope, name: String, value: String, domain: String?, path: String): Deferred<Unit>

异步向当前网页作用域添加一个 Cookie。

Return

一个 Deferred<Unit>

Parameters

scope

用于执行此操作的协程作用域。

name

Cookie 名称。

value

Cookie 值。

domain

Cookie 作用的域名。如果为 null,将使用当前页面的域名。

path

Cookie 的作用路径,通常为 "/"。