req icon indicating copy to clipboard operation
req copied to clipboard

Confusing documentation regading halt signal with step functions

Open MaSven opened this issue 10 months ago • 1 comments

When using the prepend_request_steps functions in combination with Rq.Request.halt, it is quite confusing that i have to return a tuple in my step function. I think the documentation should point this out. You can kinda see it from the example, but I was nevertheless suprised by this behaviour.

A spec for the anonymous function that we have to prepare would here. Right now the respons for the spec would be a Request.t() or {Request.t(), Exception.t() | Response.t()}. As the return of this anonymous function is limited by https://github.com/wojtekmach/req/blob/7616d399914eb28377d9fa7fdb0b0a0273e181cb/lib/req/request.ex#L977 would this not be a breaking change.

MaSven avatar Mar 30 '24 22:03 MaSven