Closed maxshuty closed 5 years ago
I think this looks otherwise good but this location is still missing the headers parameter: https://github.com/alvarcarto/url-to-pdf-api/blob/1c074f9a73b9c0e03fb85bf97a3e5081fd75023e/src/http/pdf-http.js#L46
Thanks for the contribution! This is a good suggestion, but I would rather have something like this implemented: https://github.com/alvarcarto/url-to-pdf-api/pull/99. I don't have currently time into helping in that PR but I like the idea of having full control to the request. It opens up even easier ways to exploit this service to make requests to internal services etc, but that's what the API_KEY is for.
I have added the ability to send custom headers which will help a lot of folks to resolve issues passing along a token for auth or whatever other use case they may have.
An example usage of how this is to be used is:
I'm a .NET developer by nature, but I needed this ability and I thought the community could benefit from it. Please let me know if there are any issues with this PR and I will update them.