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

Converted PowerShell code to use Splatting, and newer PS7 parameters (where available) #697

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

Natfan
Copy link
Contributor

@Natfan Natfan commented Apr 5, 2023

Also removed the requirement for UseBasicParsing, as Invoke-RestMethod already converts XML/JSON to PSObjects as required.

More info on splatting: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_splatting
More info on Invoke-RestMethod: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/invoke-restmethod

@binwiederhier
Copy link
Owner

This is great, thank you. I'll likely merge this tomorrow. I gotta say I mostly was winging the PS examples, so I'm glad somebody actually fixed them up :-D

@binwiederhier binwiederhier merged commit c63ca95 into binwiederhier:main Apr 6, 2023
@binwiederhier
Copy link
Owner

Had to fix up some formatting, but other than that it looks great.

Note that there is one example that doesn't have a PS example yet, because I didn't know how to do it. If you're interested, you can fix that too: https://docs.ntfy.sh/publish/#attach-local-file

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.

None yet

2 participants