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

Allow non standard HTTP verbs. #3113

Closed
thezim opened this issue Feb 8, 2017 · 6 comments
Closed

Allow non standard HTTP verbs. #3113

thezim opened this issue Feb 8, 2017 · 6 comments
Labels
Issue-Enhancement the issue is more of a feature request than a bug Up-for-Grabs Up-for-grabs issues are not high priorities, and may be opportunities for external contributors WG-Cmdlets general cmdlet issues

Comments

@thezim
Copy link
Contributor

thezim commented Feb 8, 2017

Web cmdlets do not allow non standard verbs. Any verb should be allowed.

@Mwiedmeyerd
Copy link

Mwiedmeyerd commented Feb 8, 2017

What is your reasoning, please?

Having non-standard verbs goes against the tenet of PowerShell discoverability

@thezim
Copy link
Contributor Author

thezim commented Feb 8, 2017

@Mwiedmeyerd in my case WebDAV. I wouldn't recommend removing the current enum, just some way to override it if needed.

@SteveL-MSFT SteveL-MSFT added WG-Cmdlets general cmdlet issues Issue-Enhancement the issue is more of a feature request than a bug Up-for-Grabs Up-for-grabs issues are not high priorities, and may be opportunities for external contributors labels Feb 11, 2017
@SteveL-MSFT
Copy link
Member

SteveL-MSFT commented Feb 11, 2017

Perhaps a new parameter set for -CustomMethod?

@joeyaiello
Copy link
Contributor

Just to clarify, you're talking about the -Method parameter on Invoke-WebRequest and Invoke-RestMethod?

PS C:\dev\joeyaiello> Invoke-WebRequest -Method Default
Default  Delete   Get      Head     Merge    Options  Patch    Post     Put      Trace

@0x4c6565
Copy link
Contributor

0x4c6565 commented Feb 13, 2017

I've just added a pull request for this. Would appreciate feedback as this is my first code pull for PS.

This PR adds the following to the Invoke-WebRequest and Invoke-RestMethod cmdlets:

  • Adds new StandardMethod ParameterSet to the pre-existing Method parameter
  • Adds new parameter CustomMethod with ParameterSet CustomMethod
  • Defaults to StandardMethod ParameterSet

The underlying WebRequest generation will use either StandardMethod or CustomMethod, depending on which set is used. CustomMethod supports the pre-existing verbs defined in the WebRequestMethod enum

@thezim
Copy link
Contributor Author

thezim commented Feb 14, 2017

@joeyaiello Yes.

@thezim thezim closed this as completed Sep 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement the issue is more of a feature request than a bug Up-for-Grabs Up-for-grabs issues are not high priorities, and may be opportunities for external contributors WG-Cmdlets general cmdlet issues
Projects
None yet
Development

No branches or pull requests

5 participants