How to get HTTP status codes from WebKitWebView? #558
-
Is there a way to get the HTTP status codes from the WebKitWebView object. I want to patch cog_handle_web_view_load_changed() to check the status codes and do some things if a specific status codes is found. I only found webkit_uri_response_get_status_code() but that seems to only be used in Download handling. Is there a similar function that I can get after WebKitWebView has loaded a page? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I never found this info in the webkit api so added it myself. In anyone else wants this this is what I changed: in webkit, in file Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp I added:
Also added this function in header file Source/WebKit/UIProcess/API/glib/WebKitWebView.h I could then use it from cog_handle_web_view_load_changed, it seems to work only in state WEBKIT_LOAD_COMMITTED and WEBKIT_LOAD_FINISHED but that is more than enough for me. |
Beta Was this translation helpful? Give feedback.
I never found this info in the webkit api so added it myself. In anyone else wants this this is what I changed:
in webkit, in file Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp I added:
Also added this function in header file Source/WebKit/UIProcess/API/glib/WebKitWebView.h
I could then use it from cog_handle_web_view_load_changed, it seems to work only in state WEBKIT_LOAD_CO…