private RestSharp.Method GetExistingSessionMethod()
{
bool reuseSession = false;
if (FindCookie(client, clientConfig.SessionCookieName, (cookie) =>
{
reuseSession = cookie.TimeStamp.AddMinutes(60) > DateTime.Now;
}) == false)
{
reuseSession = false;
}
if (reuseSession == true)
{
return RestSharp.Method.GET;
}
else
{
return RestSharp.Method.POST;
}
}