Skip to content

idea: respond with json provided by a file #68

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
alexandervantrijffel opened this issue Jul 25, 2024 · 2 comments
Closed

idea: respond with json provided by a file #68

alexandervantrijffel opened this issue Jul 25, 2024 · 2 comments

Comments

@alexandervantrijffel
Copy link

It would be great if a json file could be provided to the docker image which will be used to send as the response body for all requests. With that, we can control which response data is returned without having to send the json payload in the body of the request.

@mendhak
Copy link
Owner

mendhak commented Aug 11, 2024

I've pushed a test tag to Docker Hub, issue-67-68, if you can test it that would be great but I'll merge it later.

Set the environment variable to the file path, the file needs to be mounted in the /app directory.

docker run -d --rm -v ${PWD}/test.html:/app/test.html -p 8080:8080 -e OVERRIDE_RESPONSE_BODY_FILE_PATH=/test.html -t mendhak/http-https-echo:issue-67-68

@mendhak
Copy link
Owner

mendhak commented Aug 17, 2024

Tag :34 is now pushed to Docker Hub and Github

@mendhak mendhak closed this as completed Aug 17, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants