I'm facing the same issue, please assist on this.
I used ProxyOnce to record my request and response in a stub and I tried to check using curl command.
For example, this is my host url --- curl -X GET
http://127.0.0.1:9907/get -i
below is the response,
HTTP/1.1 200 OK
Connection: close
Date: Tue, 26 Mar 2024 19:47:07 GMT
Transfer-Encoding: chunked
It just gives the status code, but not the response. And in my log it says as below.
info: [http:9907] ::ffff:
127.0.0.1:2921 => GET /get
info: [http:9907] no predicate match, using default response
fyr, pasting my stub.json file
{
"imposters": [
{
"protocol": "http",
"port": 9907,
"predicates": [
{
"equals": {
"headers": {
"Connection": "keep-alive",
"User-Agent":
"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
"Accept": "*/*",
"Sec-Fetch-Site": "none",
"Sec-Fetch-Mode": "cors",
"Sec-Fetch-Dest": "empty",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "en-US,en;q=0.9,bn;q=0.8,hi;q=0.7"
}
}
},
{
"deepEquals": {
"method": "GET"
}
},
{
"deepEquals": {
"path": "/get"
}
}
],
"responses": [
{
"is": {
"statusCode": 200,
"headers": {
"Date": "Tue, 26 Mar 2024 19:09:14 GMT",
"Content-Type": "application/json",
"Content-Length": "552",
"Connection": "keep-alive",
"Server": "gunicorn/19.9.0",
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Credentials": "true"
},
"body":
"{\n \"args\": {}, \n \"headers\": {\n \"Accept\": \"*/*\", \n \"Accept-Encoding\": \"gzip, deflate, br\", \n \"Accept-Language\": \"en-US,en;q=0.9,bn;q=0.8,hi;q=0.7\", \n \"Host\": \"httpbin.org\", \n \"Sec-Fetch-Dest\": \"empty\", \n \"Sec-Fetch-Mode\": \"cors\", \n \"Sec-Fetch-Site\": \"none\", \n \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36\", \n \"X-Amzn-Trace-Id\": \"Root=1-5f41681e-1d64b97fd4a6a3a28353395b\"\n }, \n \"origin\": \"106.215.49.96\", \n \"url\": \"http://httpbin.org/get\"\n}\n",
"_mode": "text"
}
}
]
}
]
}
Please help to resolve by identifying the issue, I also tried with 'equals' instead of 'deepEquals' still the issue persists.
Thanks,
Prathibha