Skip to content

Weird comparaison in log creation. #1715

Answered by 255kb
Kornishon515 asked this question in Help
Discussion options

You must be logged in to vote

From what I understand, the difference between log.url and log.route is the presence of URL parameters. The original URL is stored in log.url, while the matched route pattern is in log.route.
So my question is: why are we checking log.url when log.route seems to provide more information?

Indeed, but the code you linked to only makes sense (yet) when you want to mock endpoints that don't exist yet in your setup. In this case, the route will be null. Also, when calling /non/existing/path against your mock API we have no way to know if and which path section should be a route param.

The route property is currently only used to inform the user if the route was caught or not, independently o…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Kornishon515
Comment options

@255kb
Comment options

Answer selected by Kornishon515
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy