Declare that a parameter will be transmitted to the API through the query string.
It will be serialized as part of a JSON object, and will go through URL serialization.
The serialization format is not customizable.
There are currently two kinds of symbol to do this: viaQuery and queryParam.
viaQuery should be applied to the parameter itself, while queryParam
is applied to the function.
queryParam was introduced long before the D language for UDAs on parameters
(introduced in DMD v2.082.0), and will be deprecated in a future release.
// For a call to postData("D is awesome"), the server will receive the query:// POST /data?test=%22D is awesome%22voidpostData(@viaQuery("test") stringdata);
Declare that a parameter will be transmitted to the API through the query string.
It will be serialized as part of a JSON object, and will go through URL serialization. The serialization format is not customizable.
There are currently two kinds of symbol to do this: viaQuery and queryParam. viaQuery should be applied to the parameter itself, while queryParam is applied to the function. queryParam was introduced long before the D language for UDAs on parameters (introduced in DMD v2.082.0), and will be deprecated in a future release.