vibe.d beta banner
get vibe.d
0.10.1

Asynchronous I/O that doesn’t get in your way, written in D

Function queryParam

Declare that a parameter will be transmitted to the API through the query string.

WebParamAttribute queryParam (
  string identifier,
  string field
) @safe;

It will be serialized as part of a JSON object, and will go through URL serialization. The serialization format is not customizable.

Parameters

NameDescription
identifier The name of the parameter to customize. A compiler error will be issued on mismatch.
field The field name to use. ---- // For a call to postData("D is awesome"), the server will receive the query: // POST /data?test=%22D is awesome%22 @queryParam("data", "test") void postData(string data); ----
Authors

Sönke Ludwig, Михаил Страшун

Copyright

© 2012-2017 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.