Пример #1
0
            public override IoStatus Execute(DeviceCommand device)
            {
                response = HttpParser.HTTPResponse.InitResponse();
                // Log the request
                device.Logger.Add(new Log(LogType.HttpQuery, rawRequest));
                // Issue the request
                IoStatus status = RestExecute(device, Encoding.ASCII.GetBytes(rawRequest.ToCharArray()));

                // Log the reply
                try
                {
                    device.Logger.Add(new Log(LogType.HttpResponse, new string(Encoding.ASCII.GetChars(status.buffer, 0, (int)status.size))));
                }
                catch (Exception) { }

                return(status);
            }
Пример #2
0
 public override IoStatus Execute(DeviceCommand device)
 {
     response = HttpParser.HTTPResponse.InitResponse();
     return(RestExecute(device, toWrite));
 }