hbons / webkit2-sharp

C# bindings for WebKit 2 with GTK+ 3
MIT License
2 stars 2 forks source link

SoupMessageHeaders #5

Open Avidon0 opened 6 years ago

Avidon0 commented 6 years ago

Hi,

I'm trying to integrate an oauth sign-in page in my gtk3-sharp mono app, which requires an integrated web browser from which I can read the HTTP response headers.

I tried using webkit2-sharp, which seems to work fine - except that the methods/properties for reading the headers are missing.

I noticed these warnings (among many others) when building:

WebKit2.URIRequest.GetHttpHeaders - Unknown return type: SoupMessageHeaders WebKit2.URIResponse.HttpHeaders - property has unknown type 'SoupMessageHeaders' WebKit2.URIResponse.GetHttpHeaders - Unknown return type: SoupMessageHeaders*

Do you have any ideas about how I might be able to go about solving this?

Thanks, Dave

hbons commented 5 years ago

It means that these APIs could not be bound automatically. I've adapted a couple of APIs for my use cases, but not the whole set. You can add methods and their adjustments in https://github.com/hbons/webkit2-sharp/blob/master/sources/webkit2-sharp.metadata but I'm not really sure how this works anymore...

hbons commented 5 years ago

btw, this project was automatically generated by Bindinator, which itself uses Gobject Introspection to generate the bindings. I can't quickly find the manual for the metadata scheme, but that would be a good place to start. I'd accept your PRs if you can make it work. :)

hbons commented 5 years ago

Found that gtk-sharp has lots of examples: https://github.com/mono/gtk-sharp/blob/fa0897dc2cd15f76ca09ad08de9fbf9efa411f8d/gtk/Gtk.metadata

Avidon0 commented 5 years ago

Thanks for the help. I'll fiddle around with it and see if I can get it to work