-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvement - Imposter responses #178
base: main
Are you sure you want to change the base?
Improvement - Imposter responses #178
Conversation
Signed-off-by: Adam Ludes <[email protected]>
Signed-off-by: Adam Ludes <[email protected]>
Signed-off-by: Adam Ludes <[email protected]>
I'm planning to get that one merged over the next few days, I'll ping you once ready so you can pull those changes. Thanks! 🙏🏻 |
"time" | ||
) | ||
|
||
// ImposterHandler create specific handler for the received imposter | ||
// Handler create specific handler for the received imposter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a mistake/typo? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for this @deerbone, this is also a nice idea. However, my feeling is that it might have conflicts with #177. For instance, I guess that applyTemplate
will need to be part of the writeBody
function.
So, let's try to get the other one merged, so later we can more easily see if there's any conflict with this changeset and do a final review.
🙌🏻 🙇🏻
@joanlopez for sure, there will be conflicts but nothing major that I can't resolve. I'll revisit this PR once the other one is merged. |
This PR introduces preloading response body into memory before the mockserver starts. This makes it easier to spot bugs in a configuration that uses a lot of BodyFiles. Any issue with the files is now clearly logged on startup. Watcher still works even with this change.
This change improves the speed of the server since the data doesn't need to get loaded every time a request arrives.
I have also fixed the imposter base path bug, that I later realized is already implemented by #173. I can remove it, but it would be nice to have that fix merged since the main branch is harder to use because of it.