Skip to content
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

feature request: allow configuring returned status code via header or similar #89

Closed
TristanSpeakEasy opened this issue Jan 29, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@TristanSpeakEasy
Copy link

Would be great if you could control status code wiretap returned in mock mode via a header maybe something like x-wiretap-status-code

@daveshanley daveshanley added the enhancement New feature or request label Mar 7, 2024
daveshanley added a commit that referenced this issue May 2, 2024
setting a header with ‘wiretap-status-code’ and a status code, will automatically override any status code set by the OpenAPI spec when running in mock mode.

Only works for successful mocks, any errors/failed mock requests will return the extsing error codes.
@daveshanley daveshanley mentioned this issue May 2, 2024
daveshanley added a commit that referenced this issue May 2, 2024
setting a header with ‘wiretap-status-code’ and a status code, will automatically override any status code set by the OpenAPI spec when running in mock mode.

Only works for successful mocks, any errors/failed mock requests will return the extsing error codes.
@daveshanley
Copy link
Member

Available in wiretap v0.1.11

Documented here: https://pb33f.io/wiretap/mock-responses/#override-response-code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants