getCookies static method
- String uri
Static inquiry method that can be used to share cookies between connections to the Server (performed by this library) and connections to other sites that are performed by the application.
With this method, cookies received from the Server can be
extracted for sending through other connections, according with the URI to be accessed.
See addCookies for clarifications on when cookies are directly stored
by the library and when not.
uri
the URI to which the cookies should be sent.
Returns an immutable list with the various cookies that can be sent in a HTTP request for the specified URI.
Implementation
static Future<List<Cookie>> getCookies(String uri) async {
var arguments = <String, dynamic>{
'uri': uri
};
List<String> cookies = (await NativeBridge.instance.invokeMethod('LightstreamerClient.getCookies', arguments)).cast<String>();
return cookies.map((e) => Cookie.fromSetCookieValue(e)).toList();
}