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

Get-User Search Breaks With Plus Sign #16

Closed
rpesta opened this issue Sep 27, 2018 · 1 comment
Closed

Get-User Search Breaks With Plus Sign #16

rpesta opened this issue Sep 27, 2018 · 1 comment

Comments

@rpesta
Copy link

rpesta commented Sep 27, 2018

Get-User -search "email+label@email.com" appears to not work at all, as it doesn't return any results when the email address exists in the system. I think the + sign is breaking the search.

Here's the verbose output:
VERBOSE: [ConvertTo-GetParameter] Making HTTP get parameter string out of a hashtable
VERBOSE: [Invoke-SnipeitMethod] Invoking method Get to URI https://domain.snipe-it.io/api/v1/users?offset=0&search=test+2@test.com&sort=&limit=50&order=desc
VERBOSE: GET https://domain.snipe-it.io/api/v1/users?offset=0&search=test+2@test.com&sort=&limit=50&order=desc with 0-byte payload
VERBOSE: received -1-byte response of content type application/json
VERBOSE: [Invoke-SnipeitMethod] Status code: 200
VERBOSE: {"total":0,"rows":[]}
VERBOSE: [Invoke-SnipeitMethod] Function ended

@shinjijai
Copy link

I haven't tested it, but if you update Invoke-SnipeITMethod's URI to have [System.Web.HttpUtility]::UrlEncode($URI) this should fix the issue.

snazy2000 added a commit that referenced this issue Apr 27, 2019
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

3 participants