Request Matching
Understand how moclojer matches requests to endpoints - method, path, headers, and query parameters. Learn matching precedence and conflict resolution.
Learn how moclojer matches incoming requests to configured endpoints.
π― Matching Criteria
moclojer matches requests using:
HTTP Method (GET, POST, etc.)
Path Pattern (exact β params β wildcards)
Host (if specified)
π Matching Order
# 1. Exact path matches first
- endpoint:
method: GET
path: /users/me
# 2. Path parameters second
- endpoint:
method: GET
path: /users/:id
# 3. Wildcards last
- endpoint:
method: GET
path: /users/*β
Best Practices
Specific before generic - Order matters
Avoid overlapping patterns - Can cause conflicts
Use different methods - Same path, different methods OK
π See Also
Last updated
Was this helpful?