Get the HTTP response status code and headers with screenshots

On rare occasions, you might need to get the HTTP status code and headers of the target host. It is pretty easy to do now.

Changelog 1 min read

Written by

Dmytro Krasun

Published on

We deployed a new version of the API that returns the HTTP response status code and headers when possible.

To get the status code or the headers, just set one of the needed parameters to true: metadata_http_response_headers=true or metadata_http_response_status_code=true. And you will get all the data when available:

A response example

In the example, above it is rendered as JSON, because response_type is set to json and cache to true. But if you render a binary screenshot, not JSON, you can get that data from the API response headers as X-ScreenshotOne-HTTP-Response-Status-Code and ScreenshotOne-HTTP-Response-Status-Headers.

Headers and status codes might not be available when the target host DNS name is not resolved, there is a network error, or even just timeout error and the host doesn’t respond.

Hope you find it helpful, enjoy and have a nice day!

Read more product updates

New features, bug fixes, and optimizations...

View all product updates
Better and more extensible PDF rendering

Better and more extensible PDF rendering

ScreenshotOne supports PDF rendering for a long time but it was used till recently by a small group of customers. Growing demand in PDF rendering required updating the API. And today, we introduce new options for PDF customization.

Read more

1 min read

Fixed a validation issue in the playground

Fixed a validation issue in the playground

We fixed a validation issue in the ScreenshotOne playground caused by selector scroll into view.

Read more

1 min read

Improved uploading and error handling to S3-compatible storage

Improved uploading and error handling to S3-compatible storage

Today, the new version of ScreenshotOne API was deployed to production that enables a retries mechanism when uploading to an S3 storage and more granular error handling.

Read more

1 min read

Automate website screenshots

Exhaustive documentation, ready SDKs, no-code tools, and other automation to help you render website screenshots and outsource all the boring work related to that to us.