-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Sending Authentication/token Info #142
Comments
@vaibhav15s, I guess you can take needed page directly via Lines 100 to 110 in 2fbe33f
Try to place https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setExtraHTTPHeaders async function htmlTune(html){
// get HTML into Chrome to get computed style via `runtimeConsoleHandler`
var options = {
port: 9222,
runtimeConsoleHandler: getTemplateImageDimentions
}
// https://chromedevtools.github.io/devtools-protocol/tot/
var tab = await CDP.New(options)
var client = await CDP(Object.assign({}, options, { target: tab }))
// Enable events to be used here
await Promise.all([
client.Network.clearBrowserCache(),
client.Network.enable(),
client.Page.enable(),
client.Runtime.enable(),
]);
if (options.runtimeConsoleHandler) {
client.Runtime.consoleAPICalled(options.runtimeConsoleHandler)
}
const { frameTree } = await client.Page.getResourceTree()
// open HTML and get info via `runtimeConsoleHandler`
await client.Page.setDocumentContent({ html, frameId: frameTree.frame.id })
await client.Page.loadEventFired()
await CDP.Close(Object.assign(options, { id: tab.id }))
} |
- fixes Sending Authentication/token Info westy92#142 - fixes Add extra http header westy92#198
I just published v0.6.0 which now supports sending custom HTTP headers with a request! |
Hi
Is there a way I can send token information or basic authentication?
The text was updated successfully, but these errors were encountered: