Try HTTP Request
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
buildInputs = with pkgs; [
|
||||
glib
|
||||
libadwaita
|
||||
libsoup_3
|
||||
];
|
||||
};
|
||||
default = self.packages."${system}".allesapp;
|
||||
|
@@ -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());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -8,6 +8,7 @@ allesapp_deps = [
|
||||
config_dep,
|
||||
dependency('gtk4'),
|
||||
dependency('libadwaita-1', version: '>= 1.4'),
|
||||
dependency('libsoup-3.0'),
|
||||
]
|
||||
|
||||
allesapp_sources += gnome.compile_resources('allesapp-resources',
|
||||
|
Reference in New Issue
Block a user