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

URLEncoding of query string parameters #523

Merged
merged 17 commits into from
May 20, 2023

Conversation

sevaa
Copy link
Contributor

@sevaa sevaa commented May 12, 2023

PR Summary

Refactor to get rid of crude and incorrect _appendQueryString. Query string parameter values that can potentially be strings should be URLEncoded. Also, _appendQueryString was assuming that the URL already had a query string and produced invalid URLs if the API version was blank.

Fixes #442, #517

PR Checklist

Seva Alekseyev added 3 commits May 12, 2023 11:25
@sevaa
Copy link
Contributor Author

sevaa commented May 12, 2023

@SebastianSchuetze The tests are failing for me on PowerShell 5 because -Depth was not a valid parameter on ConvertFrom-Json until PS 6.2. Should I:

  • Get rid of -Depth - it's an optimization at best, not a hard requirement
  • Introduce a condition
  • Not test on PS5 at all
    ?

@SebastianSchuetze
Copy link
Collaborator

Do you mean they fail locally on your machine or are you talking about the test failing in the pipeline. In the future PS5 was planned to not be supported anymore with VSTeam. That would be Version 8.0.0. As for now I would suggest the one that makes the shift as easy as possible to version 8 but still working with 7.x.

Which would be the best option from your side?

@sevaa
Copy link
Contributor Author

sevaa commented May 12, 2023

Failing on my machine. There is no PS5 build in the pipeline.

I'd prefer to remove the -Depth. This will break nothing.

PS5.1 is still the version that ships with Windows 10/11 and Windows Server. PS 6-7 is an optional install.

@sevaa sevaa marked this pull request as ready for review May 12, 2023 20:02
@sevaa
Copy link
Contributor Author

sevaa commented May 17, 2023

@SebastianSchuetze Ready,

@SebastianSchuetze SebastianSchuetze merged commit ca4bb01 into MethodsAndPractices:trunk May 20, 2023
@sevaa sevaa deleted the fix_urlencode branch May 23, 2023 18:20
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.

Get-VSTeamVariableGroup by name throws error 404 with TFS 2020 u1.1
2 participants