sideshowcoder / canned

Server to respond with fake API responses, by using a directory of files for finding out what to say!
213 stars 46 forks source link

variable header responses for POST and regex for XML response #52

Closed vikalp closed 9 years ago

vikalp commented 9 years ago

1) extending content and header objects to ensure variable header responses for POST 2) Improvement of regex for XML response. addition of special characters, =, + etc.

vikalp commented 9 years ago

This is helping us to ensuring we are able to even mock SOAP calls, by ensuring we pass right SOAP header information in the header params of responses.

Also, we have found that XML was breaking due to regex not having some special characters, and complete XML response was not being pushed back. This pull request will fix that as well.

Do let me know if you have any comments on the same.

sideshowcoder commented 9 years ago

First of all thanks so much for this! Looks perfectly good to me, but do you mind adding a test so future changes don't break it by accident than I could get this merged immediately, thanks.

vikalp commented 9 years ago

Thanks for amazing project, already started using in my org, more pulls to come for sure.

will right tests, and share updated pull. lazy mee, should have done earlier itself. thanks.

vikalp commented 9 years ago

Do see if this stands good to be pulled. Thanks!!

sideshowcoder commented 9 years ago

Looks good will merge when I'm back at my computer. Thanks! If you are interested in sharing there is also a wiki page which I started to share canned use cases, hopefully in the long run this might be a great resource for others getting started.

sideshowcoder commented 9 years ago

Thanks a lot for your work! I'll add you to the list of contributors and your patch will be included in the next release on npm :+1:

vikalp commented 9 years ago

great, thanks. :)