/// <summary> /// Sets a 302 response status code and the Location header. /// </summary> /// <param name="location">The location where to redirect the client.</param> /// <param name="statusCode">302 status code by default, this param is for easy swap for 301s.</param> public virtual void Redirect(string location, int statusCode = 302) { StatusCode = statusCode; MiddlewareHelpers.SetHeader(RawHeaders, MiddlewareOwinConstants.Headers.Location, location); }
/// <summary> /// Sets a specific header value. /// </summary> /// <param name="key">The header name.</param> /// <param name="value">The header value.</param> public void Set(string key, string value) { MiddlewareHelpers.SetHeader(Store, key, value); }