Hello, is there any example for how to make post request to the authenticated web site. I want to do same thing with below code segment implemented in java for Qt application. I just want to implement http post request with basic authentication in Qt.

String userName = "myusername";
String password = "mypassword";


String cridentials = new sun.misc.BASE64Encoder().encode((userName + ":" + password).getBytes());

// Send data

URL url = new URL("Mywebsite");
URLConnection conn = url.openConnection();
conn.setDoOutput(true);
conn.setRequestProperty ("Authorization", "Basic " + cridentials);
String encodedData = URLEncoder.encode("Test Symbian!..", "UTF-8");

OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
wr.write("status=" + encodedData);
wr.flush();

// Get the response
BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String line;
while ((line = rd.readLine()) != null) {
System.out.println(line);
// Process line...
}
wr.close();
rd.close();