Skip to content

Conversation

cimc-raffles
Copy link

What kind of change does this PR introduce? (check at least one)

  • [x ] Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • [x ] No

If yes, please describe the impact and migration path for existing applications:

Related issue (if exists):

Other information:
When using the Mock feature, requests with the same URL but different methods cannot be correctly matched because the matching is currently only done based on the request URL. For example, cgiMock({url: '/api/users', method: 'GET'}) and cgiMock({url: '/api/users', method: 'POST'}) will both attempt to match the same mock configuration, which can lead to unexpected behavior.

This change introduces method-based matching to resolve the issue, allowing for distinct mock configurations for different request methods on the same URL.

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.

1 participant