Skip to content

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.

3 participants