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

Optional query / header params are leaking into subsequent requests #50

Open
alechill opened this issue Dec 6, 2022 · 0 comments · May be fixed by #51
Open

Optional query / header params are leaking into subsequent requests #50

alechill opened this issue Dec 6, 2022 · 0 comments · May be fixed by #51

Comments

@alechill
Copy link

alechill commented Dec 6, 2022

Given an endpoint has optional args mapped to query or header params...

@GET("/something")
@Queries({
    ping: 'pong'
})
async getSomethingWithOptionalQuery(@Query('since') since?: string, @QueryMap filters?: Record<string, string>): Promise<Response> { 
    return <Response>{} 
};
  • Request passing some optional args service.getSomethingWithOptionalQuery('foo', { fizz: 'buzz' })

    • => /something?ping=pong&since=foo&fizz=buzz
  • Request again with no optional args service.getSomethingWithOptionalQuery()

    • => /something?ping=pong&since=foo&fizz=buzz
    • expected /something?ping=pong

    Same occurs with optional headers

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 a pull request may close this issue.

1 participant