Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[FEATURE]: Move request dumping methods to AbstractRestSharpAbility #251

Open
2 tasks done
thePantz opened this issue Jan 25, 2023 · 1 comment
Open
2 tasks done
Labels
enhancement New feature or request

Comments

@thePantz
Copy link

thePantz commented Jan 25, 2023

Description

Currently we have these methods within CallRestApi:


        public CallRestApi DumpingRequestsTo(string dumpDir, string fileToken = "Request")
        {
            base.RequestDumper = new RequestDumper("REST Request Dumper", dumpDir, fileToken);
            return this;
        }

        public CallRestApi DumpingDownloadsTo(string dumpDir, string fileToken = "Download")
        {
            base.DownloadDumper = new ByteDumper("REST Download Dumper", dumpDir, fileToken);
            return this;
        }

These are great but only available if you're using this ability, otherwise you need to implement your own.
I feel that the above will handle 90% of the cases when using RestSharp and it would be great if we got them 'for free'

I propose making these virtual methods on AbstractRestSharpAbility so they have this default implementation, but could be overridden if the caller wishes. Thoughts?

Alternatives

Implement the dumpers on each ability that uses AbstractRestSharpAbility

Anything else?

No response

Commitments

  • I agree to follow Boa Constrictor's Code of Conduct.
  • I want to work on this issue myself. (This is voluntary, not required.)
@thePantz thePantz added the enhancement New feature or request label Jan 25, 2023
@AutomationPanda
Copy link
Contributor

This is not a bad idea! @thePantz, if you have time, please sketch it out in the code and drop some snippets here or send a pull request for further review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants