Save page of WebKitWebView into file

I have this almost solved. I've found this function:

void
webkit_web_view_save_to_file (WebKitWebView *web_view,
                              GFile *file,
                              WebKitSaveMode save_mode,
                              GCancellable *cancellable,
                              GAsyncReadyCallback callback,
                              gpointer user_data);

in the WebKitGTK official documentation

In my project I use it like this:

webkit_web_view_save_to_file( WEBKIT_WEB_VIEW(webview), g_file_new_for_path("/absolute/path/to/file"), WEBKIT_SAVE_MODE_MHTML, NULL, NULL, NULL);

However, it does absolutely nothing (There's no file where it should be - maybe I'm missing something?). I've even put it inside a while(true) loop (With a sleep(10) after the webkit_web_view_save_to_file()).

How can I make it work?

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum