question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The `request` given to `passthrough` doesn't have query params

See original GitHub issue

Believe the request object we pass to passthrough when its used as a function doesn’t have queryParams defined, not sure if this is a Pretender thing or an us thing

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:4
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
samselikoffcommented, Jun 4, 2020

The way pretender works is you access the query params via the request object. Does the route handler fire if you just put this.get(‘movies’)?

– Sam

On Jun 4, 2020, at 2:29 AM, Tulakan Ruangrong notifications@github.com wrote:

Not sure whether this is related. I have tried MirageJS on React Native and found that queryParams doesn’t work. The route and request looks like this:

this.get(‘/movies?a=:a’, …)

// request fetch(‘/movies?a=1’)… and here is the error I have got:

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

1reaction
bluenexcommented, Jun 4, 2020

Not sure whether this is related. I have tried MirageJS on React Native and found that queryParams doesn’t work. The route and request look like this:

this.get('/movies?a=:a', ...)

// request
fetch('/movies?a=1')..

and here is the error I have got:

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to pass through parameters using a get/ fetch statement ...
If it's a get API I think you can add a query param in your client getItems() { try { const email =...
Read more >
Query Parameter is not reflecting in the Request Flow OSB11g
Dear friends,. we have requirement to make a pass-through proxy for rest service. we have configured business service with following query ...
Read more >
Query Parameters - Branch.io
Query parameters are a defined set of parameters attached to the end of a url. They are extensions of the URL that are...
Read more >
Solved: How do I fecht URL query params in liquid in order...
Solved: Hi, I am just starting with Power Portals and I have this question. In one page I have a list component where...
Read more >
Query parameters - Recipes - Mock Service Worker Docs
In order to access a query parameter of the intercepted request, use the searchParams property on the req.url instance.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found