Beispiel #1
0
 public Rest(IPAddress ip, int port)
 {
     Ip = ip;
     Port = port;
     AssemblyName assembly = this.GetType().Assembly.GetName();
     serverHeader = new StringHeader("Server", String.Format("{0}/{1}", assembly.Name, assembly.Version));
 }
Beispiel #2
0
 /// <summary>
 /// Redirect user.
 /// </summary>
 /// <param name="uri">Where to redirect to.</param>
 /// <remarks>
 /// Any modifications after a redirect will be ignored.
 /// </remarks>
 public void Redirect(string uri)
 {
     Status = HttpStatusCode.Redirect;
     _headers["Location"] = new StringHeader("Location", uri);
 }