Get one cat

GET https://http.cat{{statusCode}}

  1. We see {{statusCode}} at the end of the URL. The curly braces syntax allows you to use defined variables in the text fields. But wait, we haven’t defined a variable called statusCode yet.
  2. Look under the Pre-request Script tab in Qodex. People use pre-request scripts for setting up their main request, for example calculating or retrieving a variable. Let’s do that now. Under the Pre-request Script tab, we see code to retrieve all of our scraped hyperlinks and remove one to be used in this request. We also save this data as a variable so that it can be accessed in the main request.
  3. We can continue cycling through all the status codes remaining in allCodes by continuing to hit Send.
  4. It can be tricky to see exactly what Qodex is sending to the server since {{statusCode}} isn't defined until the pre-request script runs when the request is sent. Open the [Qodex console] for more visibility into the network calls and log statements.
[422 unprocessable entity](https://http.cat/422)