-
Notifications
You must be signed in to change notification settings - Fork 174
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
Generate cmdlets from forked AutoREST.PowerShell repository. #2542
Conversation
Is it possible to use the same syntax as CLI for headers? i.e. |
I agree that the semicolon is a weird character for this situation. I'd rather have an actual hashtable / PSObject. Easier to build dynamically if needs be. Thoughts? |
@calebkiage @sebastienlevert yes it can change, however I preferred the approach of setting http headers the way it is normally done in a curl request. e.g |
I think we should be using the same approach that Invoke-WebRequest (and other similar Cmdlets) are using. https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-webrequest?view=powershell-7.4#-headers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing on the most asked for feature! Please see my comment below on improvements to the UX of the parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #1570 and #2476
Changes proposed in this pull request
Generated cmdlets were published to an internal feed. Using cmdlets obtained from that feed manual tests involving PATCH, POST and DELETE operations were done while raptor handled GET operations. Use this script to register the feed as a PS repository.
Sample cmdlet with optional custom header parameter
**Sample cmdlet extracting the correct media type from file inputs and setting the correct request content type. (Intitally all input file requests defaulted to application/octet-stream
Sample cmdlet with optional parameter for specifying the media/content type for file inputs
Sample raptor test run results for stable tests
NB This was locally run because the feed was registered locally.