First let me preface by saying I am not a C coder and have been trying to figure this out for a bit. I am wanting to grab out the http response headers and put them into a map. I was able to figure out how to grab a single header by name, but have been unable to figure out how to grab out the entire list and convert into map. I looked through the gtk webkit2 docs and see it uses a callback function but I am unable to implement. Any help or insight would be appreciated.
./src/github.com/sourcegraph/go-webkit2/webkit2/webview.go:119: cannot convert func literal (type func(string, string, *C.gpointer)) to type *C.SoupMessageHeadersForeachFunc
../src/github.com/sourcegraph/go-webkit2/webkit2/webview.go:137: cannot use build_headers (type *C.SoupMessageHeadersForeachFunc) as type *[0]byte in argument to _Cfunc_soup_message_headers_foreach
First let me preface by saying I am not a C coder and have been trying to figure this out for a bit. I am wanting to grab out the http response headers and put them into a map. I was able to figure out how to grab a single header by name, but have been unable to figure out how to grab out the entire list and convert into map. I looked through the gtk webkit2 docs and see it uses a callback function but I am unable to implement. Any help or insight would be appreciated.
This works to grab out a single named header:
This is basically what i am trying to do
which returns: