TrafficItem
Assembly: ZennoLab.CommandCenter
Full name: ZennoLab.CommandCenter.TrafficItem
Kind: class
Represents a traffic item, which contains url, status and etc. information about request. Supports updating.
Constructor
TrafficItem(string s)
Constructor
Parameters
| Type | Name | Description |
|---|---|---|
string | s |
TrafficItem(string s, TrafficItem parent)
Constructor
Parameters
| Type | Name | Description |
|---|---|---|
string | s | |
TrafficItem | parent |
Properties
Url
Property
string Url { get; }
Request url.
Method
Property
string Method { get; }
Method of request.
ResultCode
Property
UInt32 ResultCode { get; }
Request status code.
IsBlocked
Property
bool IsBlocked { get; }
Flag is true, if the content policy has blocked this request, otherwise false.
HasResponse
Property
bool HasResponse { get; }
Flag is true, if the browser recieved a response for the request, otherwise false.
RequestHeaders
Property
string RequestHeaders { get; }
Request headers. To use this property, set Instance.UseTrafficMonitoring to true.
RequestQuery
Property
string RequestQuery { get; }
Query part of url. To use this property, set Instance.UseTrafficMonitoring to true.
RequestBody
Property
string RequestBody { get; }
Request body of POST request. To use this property, set Instance.UseTrafficMonitoring to true.
RequestReplacedBody
Property
string RequestReplacedBody { get; }
Request body of POST request after replacing by ChangeRequest method, if there were no replacements, then the value will be empty. To use this property, set Instance.UseTrafficMonitoring to true.
RequestCookies
Property
string RequestCookies { get; }
Request cookies. To use this property, set Instance.UseTrafficMonitoring to true.
ResponseHeaders
Property
string ResponseHeaders { get; }
Response headers. To use this property, set Instance.UseTrafficMonitoring to true.
ResponseBody
Property
Byte[] ResponseBody { get; }
Response body of POST request. To use this property, set Instance.UseTrafficMonitoring to true.
ResponseReplacedBody
Property
Byte[] ResponseReplacedBody { get; }
Response body of POST request after replacing by ChangeResponse method, if there were no replacements, then the value will be null. To use this property, set Instance.UseTrafficMonitoring to true.
ResponseCookies
Property
string ResponseCookies { get; }
Response cookies. To use this property, set Instance.UseTrafficMonitoring to true.
ResponseContentType
Property
string ResponseContentType { get; }
Response content type. To use this property, set Instance.UseTrafficMonitoring to true.
ResponseContentCharset
Property
string ResponseContentCharset { get; }
Response content charset. To use this property, set Instance.UseTrafficMonitoring to true.
Time
Property
int Time { get; }
Time (in milliseconds) between sending this request and receiving the response. To use this property, set Instance.UseTrafficMonitoring to true.
ErrorDetected
Property
bool ErrorDetected { get; }
Gets information about the error detected in the performance last refresh command.
Methods
Refresh
Method
bool Refresh()
Updates this TrafficItem object.
Returns: Whether the new data was received.
WaitResponseAsync
Method
Task WaitResponseAsync(int timeout, int delayBetweenChecks)
Asynchronous method that refreshes this TrafficItem until the response arrives or error acquires
Parameters
| Type | Name | Description |
|---|---|---|
int | timeout | The maximum timeout (in seconds) to refresh this InnerTrafficItem |
int | delayBetweenChecks | The delay (in seconds) between refreshes |
WaitResponse
Method
void WaitResponse(int timeout, int delayBetweenChecks)
Synchronous method that refreshes this TrafficItem until the response arrives or error acquires
Parameters
| Type | Name | Description |
|---|---|---|
int | timeout | The maximum timeout (in seconds) to refresh this InnerTrafficItem |
int | delayBetweenChecks | The delay (in seconds) between refreshes |
ToString
Method
string ToString()