AnWeber/vscode-httpyac

Need support in chaining and asserting requests

inakihn opened this issue · 1 comments

Hi,

Thanks for the amazing library, I'm starting to try and use it and I wanted to chain requests while asserting in all requests.

Given those two files, from the examples of the library, where I want to add assertions:

# @name getHttpbinA
GET https://httpbin.org/get?source=getHttpbinA
X-Foo: barA

?? status == 200
# @import ./a.http
###
# @name getHttpbinB
# @ref getHttpbinA
GET https://httpbin.org/get?source=getHttpbinB
X-Foo: barB-{{getHttpbinA.headers["X-Foo"]}}

?? status == 200

I expected that when executing B, the asserts from A would also be executed. But it does not seem to be the case for me. If I put a wrong assert (for example status == 500), B is still shown as executed and passed in vs code.

Does somebody have any hints on this?

I think I'll move this question to the examples repository.