示例#1
0
文件: Rest.cs 项目: Ijwu/TShock
 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));
 }
示例#2
0
文件: Response.cs 项目: Kayomani/FAP
 /// <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);
 }