This message was deleted.
# help
s
This message was deleted.
l
Hi. Would the following work for you:
Copy code
{
  "mappings": [
    {
      "name": "get-credit-report-fail",
      "request": {
        "method": "GET",
        "urlPattern": "/pvt/v1/bureau/pan-number\\?uuid=.*crs-fail"
      },
      "response": {
        "status": 500
      }
    },
    {
      "name": "get-credit-report-success",
      "request": {
        "method": "GET",
        "url": "/pvt/v1/bureau/pan-number"
      },
      "response": {
        "status": 200,
        "jsonBody": {
          "success": true,
          "data": {
            "panNumber": "ABCDE1234F",
            "vendor": "EQUIFAX"
          },
          "status_code": 200
        }
      }
    }
  ]
}
j
No I want to use queryParams. Not path. Also it worked for me by changing the order of "get-credit-report-fail", and "get-credit-report-success
l
Glad you got it working. The example I gave still uses the uuid parameter as a query parameter on the request not a path parameter. Doing it that way also meant you wouldn’t have to worry about the order of the mappings in the file.
j
ohh right. got it. thank you!
👍 1