https://linen.dev logo
#help
Title
# help
e

Ekta Bansal

07/12/2023, 9:50 AM
Copy code
{
  "request": {
    "method": "GET",
    "urlPath": "/services/data/v58.0/query",
    "headers": {
      "content-type": {
        "equalTo": "application/json"
      }
    },"queryParameters": {
      "search_term": {
        "equalTo": "WireMock"
      }
    }
  },
  "response": {
    "status": 200,
    "bodyFileName": "get-users-200.json",
    "headers": {
      "content-type": "application/json"
    }

  }
}
why it is not taking my query parameter when i mock this api,
t

Tom

07/12/2023, 9:52 AM
Can you elaborate? What request are you making and what response are you seeing?
e

Ekta Bansal

07/12/2023, 9:53 AM
curl --location 'http://localhost:9090/services/data/v58.0/query?search_term=Wiremock' \ --header 'Content-Type: application/json'
Request was not matched ======================= ----------------------------------------------------------------------------------------------------------------------- | Closest stub | Request | ----------------------------------------------------------------------------------------------------------------------- | GET | GET [path] /services/data/v58.0/query | /services/data/v58.0/query?search_term=Wiremock | content-type: application/json | content-type: application/json | Query: search_term = WireMock | search_term: Wiremock <<<<< Query does not match | | -----------------------------------------------------------------------------------------------------------------------
without query parameter it is working fine,
but when i add query parameter it is showing not found
t

Tom

07/12/2023, 9:55 AM
It’s because the “m” in WireMock is lowercase in your request and uppercase in your stub
you can use
Copy code
"caseInsensitive": true
to avoid this issue in the equalTo matcher
3 Views