Skip to content

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

@thePantz

Description

@thePantz

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions