Skip to content

Allow non standard HTTP verbs. #3113

Closed
Closed

Description

@thezim

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

Activity

  1. Mwiedmeyerd commented on Feb 8, 2017

    @Mwiedmeyerd

    What is your reasoning, please?

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

  2. thezim commented on Feb 8, 2017

    @thezim
    ContributorAuthor

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

  3. added
    WG-Cmdlets
    Issue-Enhancement
    Up-for-Grabs
    on Feb 11, 2017
  4. SteveL-MSFT commented on Feb 11, 2017

    @SteveL-MSFT
    Member

    Perhaps a new parameter set for -CustomMethod?

  5. joeyaiello commented on Feb 13, 2017

    @joeyaiello
    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
    
  6. 0x4c6565 commented on Feb 13, 2017

    @0x4c6565
    Contributor

    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

  7. thezim commented on Feb 14, 2017

    @thezim
    ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-EnhancementUp-for-GrabsWG-Cmdlets

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions