Skip to content

Conversation

@sufyankhanrao
Copy link
Contributor

What

This PR makes OnBeforeHttpRequestEventHandler and OnAfterHttpResponseEventHandler methods virtual. This allows SDKs to override these methods and invoke user-overridden callbacks methods provided in the SDK class.

Why

  • To make the Callback available for SDK class to override
  • To execute the user provided callbacks

Closes #78

Type of change

Select multiple if applicable.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause a breaking change)
  • Tests (adds or updates tests)
  • Documentation (adds or updates documentation)
  • Refactor (style improvements, performance improvements, code refactoring)
  • Revert (reverts a commit)
  • CI/Build (adds or updates a script, change in external dependencies)

Dependency Change

If a new dependency is being added, please ensure that it adheres to the following guideline https://github.com/apimatic/apimatic-codegen/wiki/Policy-of-adding-new-dependencies-in-the-core-libraries

Breaking change

If the PR is introducing a breaking change, please ensure that it adheres to the following guideline https://github.com/apimatic/apimatic-codegen/wiki/Guidelines-for-maintaining-core-libraries

Testing

List the steps that were taken to test the changes

Checklist

  • My code follows the coding conventions
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added new unit tests

This commit makes `OnBeforeHttpRequestEventHandler` and `OnAfterHttpResponseEventHandler` methods virtual. This allows SDKs to override these methods and invoke user-overridden callbacks methods provided in the SDK class.

Closes #78
@sufyankhanrao sufyankhanrao self-assigned this Aug 30, 2024
@asadali214 asadali214 self-requested a review August 30, 2024 11:22
@sufyankhanrao sufyankhanrao merged commit 3ab9d77 into main Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the HttpCallback method virtual to allow overriding the behavior

3 participants