Prakash Nath Jha
11/05/2024, 11:05 AMPrakash Nath Jha
11/05/2024, 11:06 AMPrakash Nath Jha
11/05/2024, 11:06 AM{
"request": {
"scheme": "http",
"url": "/other/thing",
"method": "GET",
"host": "<http://example.com|example.com>"
},
"scenarioName": "test",
"response": {
"status": 200,
"jsonBody": {
"body": "Hello, world!"
},
"headers": {
"Content-Type": "application/json"
}
}
}
this is the mapping filePrakash Nath Jha
11/05/2024, 11:07 AMmy_wiremock | Exception in thread "main" com.github.tomakehurst.wiremock.standalone.MappingFileException: Error loading file /home/wiremock/./mappings/mock.json:
my_wiremock | "<http://example.com|example.com>" is not a valid match operation
my_wiremock | at com.github.tomakehurst.wiremock.standalone.JsonFileMappingsSource.loadMappingsInto(JsonFileMappingsSource.java:126)
Prakash Nath Jha
11/05/2024, 11:07 AMRafe Arnold
11/05/2024, 11:12 AM"request": {
"scheme": "http",
"url": "/other/thing",
"method": "GET",
"headers": {
"host": {
"equalTo": "<http://example.com|example.com>"
}
}
},
Prakash Nath Jha
11/05/2024, 11:16 AMhost
just like you mention url
.Prakash Nath Jha
11/05/2024, 11:16 AMRafe Arnold
11/05/2024, 11:22 AMstring
type is inaccurate and would need to be an object. so,
"request": {
"scheme": "http",
"url": "/other/thing",
"method": "GET",
"host": {
"equalTo": "<http://example.com|example.com>"
}
},
Prakash Nath Jha
11/05/2024, 12:11 PMRafe Arnold
11/05/2024, 12:14 PM