Closed Samurai336 closed 8 years ago
This looks like it could be useful. I have seen a real API that sends back request parameters in the response. My only concern is that this is doing multiple string.replace() calls on every response. I'll take a look and try to get it merged and published soon. Thank you for the PR!
Hi gstroup:
Other then looping though for each token how would you go about doing it?
Also, your comment made me realize I was only updating the first instance of the token, so I've updated the code to replace all instances.
Hi gstroup:
Any updates?
Hi, I'm fine with looping through for each token. I was thinking about people that don't want to use templates... This code will still loop through for each param. Can we add an option, then check: if (options.fillTemplate) { call fillTemplate function }
What do you think?
Overall, looks good! Thank you.
Hi gstroup:
That makes sense! I've gone ahead and done that. Let me know if you agree with my naming and implementation.
Looks good. Thanks!! I'll get it merged and published as soon as I can. -Greg From: Samurai336 notifications@github.com To: gstroup/apimocker apimocker@noreply.github.com Cc: Greg Stroup gstroup@gmail.com Sent: Tuesday, January 26, 2016 1:10 PM Subject: Re: [apimocker] Added code to support file templateing. (#42)
Hi gstroup:That makes sense! I've gone ahead and done that. Let me know if you agree with my naming and implementation. — Reply to this email directly or view it on GitHub.
Any news on merging this?
Sorry for the delay. It's merged now, and published as version 0.4.11. Thank you!
Awesome! Thank you.
You can now add template tokens to you json.