alvarcarto / url-to-pdf-api

Web page PDF/PNG rendering done right. Self-hosted service for rendering receipts, invoices, or any content.
MIT License
7.01k stars 774 forks source link

implement setExtraHTTPHeaders #120

Open DanielLordMA opened 4 years ago

DanielLordMA commented 4 years ago

setExtraHTTPHeaders allows additional headers to be set on the url requested for PDF conversion. This can be pretty useful for requests that require authentication

e.g. for Bearer tokens, add: "setExtraHTTPHeaders":{ "Authorization" :"Bearer your-bearer-token" }

DanielLordMA commented 4 years ago

This overlaps with #78 and #99 but I needed this, and looks like others do to. Thanks for the great package!