Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document HttpRequest's body handler asynchronous behaviour #55

Open
franz1981 opened this issue Mar 15, 2024 · 0 comments
Open

Document HttpRequest's body handler asynchronous behaviour #55

franz1981 opened this issue Mar 15, 2024 · 0 comments
Assignees

Comments

@franz1981
Copy link

franz1981 commented Mar 15, 2024

HttpRequest's body handling, with subsequent store of the processed body in a variable, can bite users which expect it to be synchronous with other(s) steps which use its result eg

         scenario:
          - login:
            - pullSharedMap:
                key: policyHolder
                vars: [ email, password, vehicles, insured ]
            - httpRequest:
                endpoint: insurance
                GET: whatever
                headers:
                  accept: application/json
                handler:
                  body:
                    json: .token -> token
         - viewUser:
            - httpRequest:
                endpoint: insurance
                GET: wot
                headers:
                  auth: ${token}
                  accept: application/json

${token} shouldn't assume that token is been set!
Indeed to achieve that ordering should add awaitVar token in viewUser, before httpRequest or in login after httpRequest.

@franz1981 franz1981 self-assigned this Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant