phimage/Erik

How to get the response headers?

xia0ta0 opened this issue · 2 comments

I am using visit() to crawl a webpage, but how to get the HTTP response headers?

Thanks.

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

OK, I got it. Thank you!