Since the first time we rolled out the HTML to PDF API, it has been accepting POST as well as GET requests. But – in all our innocence – we always thought that people would find it easier to use a GET request. Simply because it’s so much more intuitive.
We were obviously mistaken! Now that we’ve added more information in the documentation about HTTP POST, we’re seeing that more and more businesses are making use of it.
A few good reasons to make use of POST instead of GET are:
- Your web server does not need to be accessible for us to crawl, so you can use it for pages in a members area or other secure area.
- You don’t have to create a URL first in case you only want a PDF and not a web page to begin with.
- Your conversion will be faster, because we don’t have to first visit your site and then take the HTML to our site. This basically saves one roundtrip, but can be significant with especially larger files.
Because of these advantages we have also enabled the header and footer parameters to be input as raw HTML. The same advantages apply as above, especially in the sense that you won’t have to be creating a URL first before you can use a header/footer for your PDFs.