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

Split-Path is reversing URL #3

Open
mwstg opened this issue Sep 19, 2022 · 2 comments
Open

Split-Path is reversing URL #3

mwstg opened this issue Sep 19, 2022 · 2 comments

Comments

@mwstg
Copy link

mwstg commented Sep 19, 2022

Get-VMCNotificationPreference fails to parse the URL because the variable notifPreURL converts the first half of the URL to \ like

https:\vmc.vmware.com\api\notification/loggedin/user/preferences

due to the split-path function on line 756.

@lamw
Copy link
Owner

lamw commented Sep 21, 2022

What operating system are you running this from? I'm not seeing this issues (MacOS) and technically it shouldn't matter on OS

The URL should have all forward slashes /

# $global:vmcNotificationGWConnection.Server2
https://vmc.vmware.com/api/notification/xxxxxxxx

# $global:vmcNotificationGWConnection.Server2 | Split-Path
https://vmc.vmware.com/api/notification

If you look at the code, it doesn't use any back slashes \ - https://github.com/lamw/VMware.VMC.Notification/blob/master/VMware.VMC.Notification.psm1#L836

@mwstg
Copy link
Author

mwstg commented Oct 11, 2022 via email

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

No branches or pull requests

2 participants