Ejemplo n.º 1
0
        // Constructor that will take in values that are taken from Http_Request to make
        // a Detailed_Http_Request object.
        public Client_Http_Request(Http_Request h)
        {
            this.Method = h.method;
            this.Path   = h.path;

            this.StartTimestamp = h.timestamp;
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> CreateHTTPDatapoint([FromBody] Http_Request c)
        {
            Http_Request point = new Http_Request
            {
                type      = c.type,
                method    = c.method,
                path      = c.path,
                timestamp = c.timestamp
            };

            _MetricContext.Http_Request.Add(point);
            await _MetricContext.SaveChangesAsync();

            return(CreatedAtAction("HTTP Data Created", new { date = point.timestamp }, null));
        }