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

Query parsing error 400 #1065

Closed
ili101 opened this issue Jan 16, 2023 · 0 comments · Fixed by #1066
Closed

Query parsing error 400 #1065

ili101 opened this issue Jan 16, 2023 · 0 comments · Fixed by #1066
Assignees
Labels
Milestone

Comments

@ili101
Copy link
Contributor

ili101 commented Jan 16, 2023

Describe the Bug

Hi
I'm trying to mock a server for an API with Pode.
The client send something like this to Pode:

Invoke-WebRequest 'http://example.com/public/v1/assets?eq(status,active)&limit=1&offset=0'

Pode returns error 400 and not get into the route (Add-PodeRoute -Method * -Path * ...)
Is there a way to process this request?

Note that:
If I send only "limit=1&offset=0" Pode parse the info to $WebEvent.Query.
If I send only "eq(status,active)" Pode basically ignores it witch is fine, I can get it form $WebEvent.Request.Url if I really need to.
But with both I can't get into a route.

Expected Behavior

Don't have a strong opinion if "Query" will be set or not, as long as it's available in $WebEvent.Request.Url and I can process the call it's enough for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants