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

feat: http interceptor path params (#87) #140

Merged
merged 35 commits into from
May 25, 2024

Conversation

diego-aquino
Copy link
Member

@diego-aquino diego-aquino commented May 15, 2024

Features

  • [#zimic] Added support to inferred path params from dynamic URLs.
interceptor.get('/users/:id').respond((request) => {
  console.log(request.pathParams.id) // '1'

  return {
    status: 200,
    body: users[0],
  };
})

await fetch('http://localhost:3000/users/1'), { method: 'GET' });

Closes #87.

@diego-aquino diego-aquino added this to the v0.5.0 milestone May 15, 2024
@diego-aquino diego-aquino changed the base branch from canary to @diego-aquino/9-custom-unhandled-request-strategies May 21, 2024 17:52
@diego-aquino diego-aquino force-pushed the @diego-aquino/9-custom-unhandled-request-strategies branch from 983999d to 8bf02ed Compare May 21, 2024 18:26
Base automatically changed from @diego-aquino/9-custom-unhandled-request-strategies to canary May 25, 2024 00:27
@diego-aquino diego-aquino enabled auto-merge (squash) May 25, 2024 00:34
@diego-aquino diego-aquino enabled auto-merge (squash) May 25, 2024 00:39
@diego-aquino diego-aquino merged commit 2608ae3 into canary May 25, 2024
14 checks passed
@diego-aquino diego-aquino deleted the @diego-aquino/87-path-params branch May 25, 2024 00:41
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

Successfully merging this pull request may close these issues.

HTTP interceptor request path params
1 participant