httpexpect icon indicating copy to clipboard operation
httpexpect copied to clipboard

Reusing a request object

Open Bios-Marcel opened this issue 3 years ago • 0 comments

Hey,

I was wondering whether it's possible to reuse a *Request or furthermore reset it.

My usecase is trying to test whether calling the same request again results in an error. Maybe my thinking here is wrong, is there an idiomatic httpexpect way of doing this?

EDIT

I guess I can wrap the request into a local function which I can call multiple times. But I was wondering anyways why calling Expect multiple times shouldn't be possible.

Bios-Marcel avatar Jan 07 '22 13:01 Bios-Marcel