On Tuesday, 11 December 2018 at 08:20:32 UTC, Arun Chandrasekaran wrote:
A typical example would be to split the HTTP query string into an AA.

vibe.d has req.queryString, but no convenient wrapper to access it as an AA.

http://localhost/hello?name=abc&id=123

I've got this far.

auto arr = req.queryString.splitter('&').map!(a => a.splitter('='));

Thanks

req.queryString[req.queryString.indexOf('?') + 1 .. $]
  .splitter('&')
  .map!(a => a.splitter('='))
  .map!(a => tuple(a.front, a.back))
  .assocArray

Reply via email to