/// <summary> /// Gets the cookie HTML representation. /// </summary> /// <returns>cookie string</returns> public override string ToString() { string temp = string.Format("{0}={1}; ", HttpUtilityHelper.UrlEncode(Name), HttpUtilityHelper.UrlEncode(Value)); if (_persistant) { // Fixed by Albert, Team MediaPortal temp += string.Format("expires={0};", _expires.ToUniversalTime().ToString("r")); } if (!string.IsNullOrEmpty(_path)) { temp += string.Format("path={0}; ", _path); } if (!string.IsNullOrEmpty(_domain)) { temp += string.Format("domain={0}; ", _domain); } return(temp); }
/// <summary> /// Gets the cookie HTML representation. /// </summary> /// <returns>cookie string</returns> public override string ToString() { return(string.Format("{0}={1}; ", HttpUtilityHelper.UrlEncode(_name), HttpUtilityHelper.UrlEncode(_value))); }
private static void Add(IHttpInput input, string name, string value) { input.Add(HttpUtilityHelper.UrlDecode(name), HttpUtilityHelper.UrlDecode(value)); }