I am a PHP developer doing a C# project
I have a C# winform project where the end user login to the software.
The login goes through a HttpWebRequest
var user = txtuser.Text;
var pass = txtpass.Text;
var url = "https://www.example.com/directory/directory.php?";
var var = "user=" + user + "&pass=" + pass;
var URL = url + var;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URL);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream dataStream = response.GetResponseStream();
// Open the stream using a StreamReader for easy access.
StreamReader reader = new StreamReader(dataStream);
// Read the content.
var responseFromServer = reader.ReadToEnd();
// Display the content.
if (responseFromServer.Contains("Access") == true)
{
Thread.Sleep(4000);
IsLoginTrue = true;
The connection is secured, but I am concerned about security because GET request are logged in plain text web logs.
Can I do an HttpWebRequest
with a POST method?