public void PutServerInfo(HttpListenerContext context) { var inpStream = new StreamReader(context.Request.InputStream); EndpointInfo.ServerInfo serverInfo = JsonConvert.DeserializeObject <EndpointInfo.ServerInfo>(inpStream.ReadToEnd()); string endPoint = ReqExtracters.ExtractEndpoint(context.Request); _db.PutServerInfo(new EndpointInfo(endPoint, serverInfo)); this.SendResponse(context.Response, "", HttpStatusCode.OK); }