Open
Description
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
Labels
No labels