module-rest icon indicating copy to clipboard operation
module-rest copied to clipboard

Possible way to `grabFullResponse()` or `grabAllHeaders()`?

Open Azuka opened this issue 10 months ago • 3 comments

Currently the rest module only supports grabResponse() which returns a string.

It would be nice to grab the full response including headers, or just the headers if needed to troubleshoot. I've looked at the documentation and it's not very clear how to get the underlying response from a test.

Azuka avatar Mar 07 '25 20:03 Azuka

grabHttpHeader() allows to grab a header by its name.

AFAIK there is no method which allows to grab all headers at once.

W0rma avatar Mar 25 '25 06:03 W0rma

grabHttpHeader() allows to grab a header by its name.

AFAIK there is no method which allows to grab all headers at once.

That's what I'm looking for. There's really no way to introspect on headers without knowing what they are.

Azuka avatar Mar 27 '25 06:03 Azuka

@Azuka I think it should be quite simple to add a method like grabHttpHeaders(). Do you want to create a PR?

W0rma avatar Mar 27 '25 06:03 W0rma

@Azuka I think it should be quite simple to add a method like grabHttpHeaders(). Do you want to create a PR?

Sorry I got sidetracked but I've opened one now. @W0rma

Azuka avatar Apr 23 '25 15:04 Azuka