supercrawler icon indicating copy to clipboard operation
supercrawler copied to clipboard

Expose response object

Open HaNdTriX opened this issue 7 years ago • 1 comments

First of all thanks a lot for this nifty crawler. I am really enjoying your api design!

Nevertheless, would it be possible to expose the entire response object in the handler api? Currently supercrawler only exposes contentType, response.body and url.

This would allow us to crawl a lot more information:

  • crawl response headers
  • handle http status codes/messages
  • performing custom redirects

I can create a PR if such a change would be acceptable.

HaNdTriX avatar Apr 18 '18 14:04 HaNdTriX

Yes, I would accept a pull request for this provided the change was backwards compatible. Adding a response property to the ctx object seems the most obvious route?

brendonboshell avatar Apr 23 '18 17:04 brendonboshell