Parameter consistency: change URL to Uri
See original GitHub issueSummary of the new feature / enhancement
As a PS user who benefits from consistency in parameter names across modules,
- when I run
Register-PSResourceRepository
- I want to provide the URL to a parameter called
Uri
(notURL
) - I want the param type to be
[uri]
(as forInvoke-RestMethod
/Invoke-WebRequest
),
- I want to provide the URL to a parameter called
- so that
- I can discover the usage of the command more easily
- I can re-use splats
- I get validation by casting string to uri
Proposed technical implementation details (optional)
- Simple rename in
src/code/SetPSResourceRepository.cs
andRegisterPSResourceRepository.cs
- I propose no alias; we’re still pre-release
irm
/iwr
declare the param as follows:
[Parameter(Mandatory=$true, Position=0)]
[ValidateNotNullOrEmpty()]
[uri]
${Uri},
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
A Beginner's Guide to URL Parameters
Poorly structured, passive URL parameters that don't change the content on the page can create endless URLs with the same content.
Read more >c# - How to replace url-parameter?
The most robust way would be to use the Uri class to parse the string, change te param values and then build the...
Read more >An SEO Guide to URL Parameter Handling
URL parameters create duplicate content, waste crawl budget, and dilute ranking signals. Learn six ways to avoid potential SEO issues with ...
Read more >Easy URL manipulation with URLSearchParams
To make actual changes to the URL, you can grab parameters, update their values, then use history.replaceState to update the URL. // URL:...
Read more >Append parameter to URL accross all pages - Drupal Answers
My idea is to use Rules to catch the current country code and append that same parameter to all links on the menu,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@anamnavi The two effective commands are:
Register-PSResourceRepository
Set-PSResourceRepository
But we also need to be consistent with our error/warning/verbose messages to use
Uri
instead ofUrl
. Also, we should rename all internal methods and parameters to useUri
.That sounds good @fsackur! We’d appreciate that PR, feel free to submit it whenever you’d like.