Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Response function instead of static data #21

Open
zlanich opened this issue Feb 9, 2019 · 2 comments
Open

Response function instead of static data #21

zlanich opened this issue Feb 9, 2019 · 2 comments

Comments

@zlanich
Copy link

zlanich commented Feb 9, 2019

Looking at Hapi.js, it looks like you can supply a function as a handler so you can take incoming path params, etc and supply a dynamic response. Why does this not seem possible with http-fake-backend? It seems like this would be like 1 line of code in supportedMethod.js to make this work.

Example usage: https://hapijs.com/api#path-parameters

@mischah
Copy link
Member

mischah commented Feb 9, 2019

Good idea 👌🏼
Are you interested in making a PR?

@zlanich
Copy link
Author

zlanich commented Feb 13, 2019

As soon as I get a small but of free time, I could do that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants