writeFormData

Encodes the given dictionary as URL encoded form data.

  1. void writeFormData(R dst, string[string] data)
    void
    writeFormData
    (
    R
    )
    (
    R dst
    ,
    in string[string] data
    )
    if (
    isOutputRange!(R, char)
    )
  2. void writeFormData(R dst, PairRange pr)

Examples

import std.array;
import vibe.core.log;
import vibe.http.form;

void test()
{
	auto dst = appender!string();
	dst.writeFormData(["field1": "value1", "field2": "value2"]);
	logInfo("Form data: %s", dst.data);
}

Meta