# Demonstrates mapping requests over a list of values.
# Will perform 6 requests in total:
#  0. Echo a request [ROLE=admin, USERNAME=foo]
#  1. Echo a request [ROLE=admin, USERNAME=bar]
#  2. Echo a request [ROLE=user, USERNAME=foo]
#  3. Echo a request [ROLE=user, USERNAME=bar]
#  4. Echo a request [ROLE=guest, USERNAME=foo]
#  5. Echo a request [ROLE=guest, USERNAME=bar]

$ REST_ORIGIN = https://lorem-api.com/api

$ ROLE = [admin, user, guest]

---

Echo a request

$ USERNAME = [foo, bar]

POST {{ REST_ORIGIN }}/echo

~~~ application/json
{
  "username" : "{{ USERNAME }}",
  "role" : "{{ ROLE }}"
}
~~~

^ & status == 200
^ & body.username ~= /bar|foo/
^ & body.role ~= /admin|user|guest/