crabbly / Print.js

A tiny javascript library to help printing from the web.
MIT License
4.31k stars 672 forks source link

request header #554

Open fredericoregateiro opened 3 years ago

fredericoregateiro commented 3 years ago

Is any way to pass custom headers to the request? I need to set the auth parameters but i cannot find a way.

Thanks

egonvb commented 3 years ago

you could retrieve the file yourself through a xhtmlRequest as a blob, create a BlobUrl of this and pass it on to the print function. this way you can add the auth parameters to your own request.

fan-ga commented 2 years ago

我想问问你解决了没

kameshpal commented 1 year ago

you could retrieve the file yourself through a xhtmlRequest as a blob, create a BlobUrl of this and pass it on to the print function. this way you can add the auth parameters to your own request.

is this solution working?