How to get the response headers?
xia0ta0 opened this issue · 2 comments
xia0ta0 commented
I am using visit() to crawl a webpage, but how to get the HTTP response headers?
Thanks.
phimage commented
I use wkwebview and I think the only way to get headers is to implement the delegate
see https://stackoverflow.com/questions/41128709/retrieve-http-response-headers-from-wkwebview
and to access the internal wkwebview there is cast
let engine = Erik.sharedInstance.layoutEngine as? WebKitLayoutEngine
xia0ta0 commented
OK, I got it. Thank you!