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

Add @httpOptions decorator to handle OPTIONS HTTP method. #313

Merged

Conversation

evandroabukamel
Copy link
Contributor

This PR adds the @httpOptions decorator to handle OPTIONS request more easily, it was also documented to show other developers that it is available to use.

Description

Adds a @httpOptions decorator in the same pattern as other decorators.
Adds in README.md an example of how to use it and why.

Related Issue

Motivation and Context

I thought about this because I implemented a CORS middleware and had some trouble to deal with it.when making a request from the browser. So, I'd like to contribute to help other developers to not get stuck like me. This PR is just the first step.

How Has This Been Tested?

The unit tests were written following the same pattern as the other HTTP methods tests.

Types of changes

  • 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 existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@PodaruDragos PodaruDragos merged commit 91ae97a into inversify:master Nov 25, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants