We have introduced two new arguments in the API 1.5: Referrer and POST data. These options are used to customize the HTTP requests done by Browshot.

Referrer

The HTTP Referrer header indicates the page previously visited. Some websites use it to display different content for users coming from a Google search, for example, for users who come from a different page on the domain, etc.

Example:

Set the HTTP Referrer to http://www.google.com/?q=test:

refer=http%3A%2F%2Fwww.google.com%2F%3Fq%3Dtest

POST data

You can now send POST request with custom data. This is useful to take the screenshot of page after filling out a form. This can be used to take screenshots of a page behind a login form for example.

Make sure you encode the POST Data correctly if you do not use one of Browshot's library.

Example

Send a logjn=foo and password=bar:

post_data=login%3Dfoo%26password%3Dbar

The library have been updated to version 1.5, but previous versions can handle the 2 new options as well.

These new options are supported with premium browsers only.