Added ability to add custom parser (correct)#46
Added ability to add custom parser (correct)#46DayneD89 wants to merge 1 commit intolamchakchan:masterfrom
Conversation
| } | ||
| catch(Exception e) | ||
| { | ||
| throw e; |
There was a problem hiding this comment.
Please note that this is breaking change. Original code silently swallows exception (which is not nice indeed), but your change throws. I would agree with your change, however it would be worth mentioning it in readme alongside feature you have added.
Also want to check, way you catch and throw - is that intentional? Do we even need try-catch block there if we want exception to be thrown anyway?
There was a problem hiding this comment.
I don't think this is a breaking change. While it originally swallowed the exception when parsing, if it got to the end without managing to parse it would throw an exception if the _content wasn't empty. Mine checks if it's an empty context at the beginning rather than the end, then throws the exception from that step instead of at the end.
|
Is there anything I can do to help get this pushed through? I needed this functionality and had to vendor this branch, which is obviously sub optimal |
|
@KyleMagocs, @lamchakchan seems to be inactive. It should be possible to move this repository under new organization and add other owners, but that would of course require Lam's action. I was already thinking about forking RestAssured.Net completely and publishing new NuGet package, but didn't have time (... and will). |
|
@KyleMagocs @wdolek I've taken my version (which pulls in a lot of wdoleks changes as well as this) and put it up here: https://www.nuget.org/packages/RestAssured2/ You're welcome to use that, as I'll be actively working on it from time to time. |
Sorry, still a noob at using git.
Anyway, this fixes the same issues that I mentioned previously, so it allows you to add your own custom parsers to parse different content types. This time its in one less messy comit though, and it has a test case and details in the readme.
If the new functions aren't called then the behaviour doesn't change, this just allows for more types to be parsed, such as csv, text or html and I believe that greatly improved the flexibility.