On 3/9/18 11:34 AM, aberba wrote:
On Friday, 9 March 2018 at 16:32:28 UTC, aberba wrote:
New blog post for the learning audience

aberba.com/2018/using-vibe-d-web-interface

http://aberba.com/2018/using-vibe-d-web-interface


Very nice! Although this is missing one of my favorite vibe.d web interface features -- automatic parsing of route parameters:


class WebInterface
{
   void getRoute(HTTPServerResponse res, int foo, Nullable!int bar)
   {
       import std.format;
       res.writeBody(format("foo = %s, bar = %s", foo, bar));
   }
}

/route => Error, foo required
/route?foo=1 => "foo = 1, bar = Nullable.null"
/route?foo=2&bar=5 => "foo = 1, bar = 5"

-Steve
  • Vibe.d web interface... aberba via Digitalmars-d-announce
    • Re: Vibe.d web ... aberba via Digitalmars-d-announce
      • Re: Vibe.d ... Martin Tschierschke via Digitalmars-d-announce
      • Re: Vibe.d ... Steven Schveighoffer via Digitalmars-d-announce
        • Re: Vib... Daniel Kozak via Digitalmars-d-announce
        • Re: Vib... Steven Schveighoffer via Digitalmars-d-announce
          • Re:... Daniel Kozak via Digitalmars-d-announce
          • Re:... aberba via Digitalmars-d-announce
          • Re:... Nick Sabalausky (Abscissa) via Digitalmars-d-announce
        • Re: Vib... aberba via Digitalmars-d-announce
          • Re:... Steven Schveighoffer via Digitalmars-d-announce

Reply via email to