Any way to get headers from request from a URL

I need to grab a cookie from a webpage after doing a request. I, obviously, get the HTML content when I load, but is there any way to access the header that gets returned as well?

Apparently, I completely missed the whole “response” function as part of a request.

I don’t know if you already found the answer, but I’m also writing it here for others when they find this.

The request object has a property response which is populated after a request with loadJSON(), loadString() or load() was completed. This property holds information about the URL, status code, headers, cookies,…

1 Like