Try HTTP Request
This commit is contained in:
@@ -60,5 +60,15 @@ public class Allesapp.Application : Adw.Application {
|
||||
|
||||
private void on_preferences_action () {
|
||||
message ("app.preferences action activated");
|
||||
|
||||
var session = new Soup.Session ();
|
||||
var msg = new Soup.Message ("GET", "http://ip4.clerie.de");
|
||||
|
||||
var input_stream = session.send (msg);
|
||||
var data_input_stream = new DataInputStream (input_stream);
|
||||
|
||||
message (data_input_stream.read_line_utf8());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user