chromedp / cdproto

Package cdproto contains the generated commands, types, and events for the Chrome DevTools Protocol domains.
MIT License
147 stars 54 forks source link

Cookie structure interoperability #14

Closed insomniacslk closed 3 years ago

insomniacslk commented 3 years ago

Hello and first off, thanks for this wonderful project :)

I am trying to map a cdproto/network.Cookie into a net/http.Cookie but it seems that the two structures are slightly different and not interoperable. Additionally there seems to be no method to percent-encode a network.Cookie into a string. My objective is to pass the network.Cookie to another program that uses a net/http.Client to communicate with its endpoint. What would be the right way to do that?

ZekeLu commented 3 years ago

The aim of the generated package github.com/chromedp/cdproto is to drive Chrome through the CDP. In your case, I think you have to convert cdproto/network.Cookie into net/http.Cookie yourself.

NOTE: Any Issue or Pull Request intended for the cdproto project should be created over https://github.com/chromedp/pdlgen.

Closing.