Skip to content

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

Open
@alechill

Description

@alechill

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions