Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add chromedp.NewRemoteAllocatorWithHeader #2

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

jscheithe
Copy link

@jscheithe jscheithe commented Jul 24, 2023

opening this PR just for discussing the changes, not intending to merge this.

In this branch, the wsHeader is passed via parameters all the way down to the DialContext function.
The header can be set like this:
actx, acancel := chromedp.NewRemoteAllocator(ctx, wsUrl, wsHeader)

No public functions are changed, instead XxxWithHeader functions are added where needed.

Pros

  • easier to use (no need for a BrowserOption etc.)
  • straightforward implementation

Cons ?

This is the branch that is currently used by github.com/contextflow/cf-dicom-report-service.

Todo:

  • Unit Tests
  • Documentation
  • Opening upstream PR

@jscheithe jscheithe changed the title Dial header paramters add wsHeader as a parameter to chromedp.NewRemoteAllocator Jul 24, 2023
@jscheithe jscheithe changed the title add wsHeader as a parameter to chromedp.NewRemoteAllocator add chromedp.NewRemoteAllocatorWithHeader Jul 24, 2023
@clushie clushie mentioned this pull request Aug 7, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants