Hey, I have recorded a bunch of requests made in ...
# wiremock-java
ž
Hey, I have recorded a bunch of requests made in my session. I see that the recorded stubs use
"bodyFileName"
in the stub response, instead of
"body"
Now, I have 2 questions: 1. Is it possible to force Wiremock to use standard json format of the body, isntead of referencing to another json file? 2. Why are my json files, that are used in the bodyFileName, empty?
1
t
2. Sounds like it could be a bug, but we’d need enough info to reproduce it to be sure. Clearly they shouldn’t be empty (assuming the upstream responses weren’t), and usually they’re not.
Compression can get in the way sometimes, so one quick thing you could try is to drop the
Accept-Encoding
header from your requests while recording.
ž
Looks like responses were too big, so I managed to fix it by this:
Copy code
.extractBinaryBodiesOver(3145728)
@Tom does wiremock also support headersFileName? Can’t find it in the documentation. I tried different names, like: • headersFileName • headerFileName • headerFile • headersFile … and it does not seem to work 🙂
t
No, I'm afraid you can't do that. Could you elaborate the use case for this? I've never experienced a situation in which the headers were big enough for this to be worthwhile.
ž
Hey, sorry for late reply. I think, since we are mostly reusing the same headers, we could, instead of copy pasting the headers, keep the stubs clean by referencing to the header file, similarly as to body files.