public void Add(string key, object value) { MyValidator.ThrowIfNullOrEmpty(key, nameof(key)); MyValidator.ThrowIfNull(value, nameof(value)); this.values[key] = value; }
public void Add(string key, string value) { MyValidator.ThrowIfNullOrEmpty(key, nameof(key)); MyValidator.ThrowIfNullOrEmpty(value, nameof(value)); this.Add(new HttpCookie(key, value)); }
public HttpSession(string id) { MyValidator.ThrowIfNullOrEmpty(id, nameof(id)); this.Id = id; this.values = new Dictionary <string, object>(); }
public void AddUrlParameter(string key, string value) { MyValidator.ThrowIfNullOrEmpty(key, nameof(key)); MyValidator.ThrowIfNullOrEmpty(value, nameof(value)); this.UrlParameters[key] = value; }
public HttpHeader(string key, string value) { MyValidator.ThrowIfNullOrEmpty(key, nameof(key)); MyValidator.ThrowIfNullOrEmpty(value, nameof(value)); this.Key = key; this.Value = value; }
public HttpCookie(string key, string value, int expires = 3) { MyValidator.ThrowIfNullOrEmpty(key, nameof(key)); MyValidator.ThrowIfNullOrEmpty(value, nameof(value)); this.Key = key; this.Value = value; this.Expires = DateTime.UtcNow.AddDays(expires); }
public HttpRequest(string requestText) { MyValidator.ThrowIfNullOrEmpty(requestText, nameof(requestText)); this.requestText = requestText; this.requestText = requestText; this.FormData = new Dictionary <string, string>(); this.UrlParameters = new Dictionary <string, string>(); this.Headers = new HttpHeaderCollection(); this.Cookies = new HttpCookieCollection(); this.ParseRequest(requestText); }
public RedirectResponse(string redirectUrl) { MyValidator.ThrowIfNullOrEmpty(redirectUrl, nameof(redirectUrl)); this.StatusCode = HttpStatusCode.Found;