Skip to content

Implement Get or Head method - #2440

Closed
rafu01 wants to merge 2 commits into
wiremock:masterfrom
rafu01:feature/implement-get-or-head-method
Closed

rafu01 wants to merge 2 commits into
wiremock:masterfrom
rafu01:feature/implement-get-or-head-method

Conversation

@rafu01

@rafu01 rafu01 commented Oct 12, 2023

Copy link
Copy Markdown

Implemented GET_OR_HEAD method as the requested issue. Feedback is welcome as this is my first contribution here, might need to change a few things.
#2414

Submitter checklist

  • Recommended: Join WireMock Slack to get any help in #help-contributing or a project-specific channel like #wiremock-java
  • Recommended: If you participate in Hacktoberfest 2023, maake sure you're signed up there and in the WireMock form
  • The PR request is well described and justified, including the body and the references
  • The PR title represents the desired changelog entry
  • The repository's code style is followed (see the contributing guide)
  • Test coverage that demonstrates that the change works as expected
  • For new features, there's necessary documentation in this pull request or in a subsequent PR to wiremock.org

@rafu01
rafu01 requested a review from a team as a code owner October 12, 2023 20:22
return new BasicMappingBuilder(RequestMethod.HEAD, urlPattern);
}

public static MappingBuilder getOrHead(String method, UrlPattern urlPattern) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the right approach - we should be building the stub mapping with the GET_OR_HEAD request method, then when matching it should match requests with either method and serve the body or not as appropriate.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for the feedback. I'll incorporate it

@leeturner

Copy link
Copy Markdown
Contributor

Hi, I think this was implemented in this PR - #2555

Perhaps we could close this one now ?

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.

4 participants