2

I am trying to capture a cookie value from a API response but the user is failing after running the command.

config:
  target: "URL"
  phases:
    - duration: 100
      arrivalRate: 10

scenarios:
  - name: "Login and fetch the token"
    flow:
      - log: "Login and Fetching the token"
      - post:
          url: "/api/v1/login/"
          json:
            username: "username"
            password: "password"
          capture:
            - cookie: "csrftoken"
              as: fooBody
      - log: "{{ fooBody }}"

0 Answers0