multiple-amethyst•3y ago
Inspect the request headers
Is there any way to inspect/log the request headers after goint to a page, just like what you can see in the Developer Console?
I tried to look at
ctx.response?.request().allHeaders(), but it is always empty.

4 Replies
@toan just advanced to level 1! Thanks for your contributions! 🎉
request is "yours" data, what you get is ctx.response and as I remeber there is also ctx.response.request
multiple-amethystOP•3y ago
Yes I understand that. That's what I'm trying to do with
ctx.response?.request().allHeaders() , getting the request headers from the response.what about the rest of properties? i.e.
?.headers[]
I used response headers under cheerio for some additional functionality but it was pretty long time ago, do not remember details