public void Process()
 {
     using (var inputStream = tcpClient.GetStream())
         using (var outputStream = streamFactory.GetStreamWriterWrapper(inputStream))
         {
             try
             {
                 ParseRequest(inputStream);
                 ReadHeaders(inputStream);
                 if (httpMethod.Equals("GET"))
                 {
                     HandleGETRequest();
                 }
                 else if (httpMethod.Equals("POST"))
                 {
                     HandlePOSTRequest(inputStream, outputStream);
                 }
             }
             catch (Exception e)
             {
                 Console.WriteLine(e.Message);
                 WriteFailure(outputStream);
             }
         }
     tcpClient.Close();
 }