ProxySession class

A session for a proxy

Constructors

ProxySession.new({required Proxy proxy, required String sessionId, required String userAgent, Map<String, String>? cookies, Map<String, String>? headers, DateTime? creationTime, DateTime? lastAccessTime, int requestCount = 0, bool isActive = true})
Creates a new ProxySession

Properties

ageInSeconds int
Gets the age of the session in seconds
no setter
cookies Map<String, String>
The cookies for this session
final
cookieString String
Gets the formatted cookie string for HTTP headers
no setter
creationTime DateTime
The creation time of this session
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
The headers for this session
final
idleTimeInSeconds int
Gets the idle time of the session in seconds
no setter
isActive bool
Whether this session is active
getter/setter pair
lastAccessTime DateTime
The last access time of this session
getter/setter pair
proxy Proxy
The proxy for this session
final
requestCount int
The number of requests made in this session
getter/setter pair
requestRatePerMinute double
Gets the request rate per minute
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sessionHeaders Map<String, String>
Gets the headers for this session
no setter
sessionId String
The session ID
final
userAgent String
The user agent for this session
final

Methods

addCookie(String name, String value) → void
Adds a cookie to the session
addCookies(Map<String, String> newCookies) → void
Adds cookies to the session
addHeader(String name, String value) → void
Adds a header to the session
addHeaders(Map<String, String> newHeaders) → void
Adds headers to the session
incrementRequestCount() → void
Increments the request count
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
updateLastAccessTime() → void
Updates the last access time

Operators

operator ==(Object other) bool
The equality operator.
inherited