vibe.d beta banner
get vibe.d
0.7.30

writeFormData - multiple declarations

  • Function writeFormData
  • Function writeFormData

Function writeFormData

Encodes the given dictionary as URL encoded form data.

Prototype

void writeFormData(R)(
  R dst,
  in string[string] data
)
if (isOutputRange!(R, char));

Example

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);
}

Function writeFormData

Encodes the given ranges of Tuple!(string, string) as URL encoded form data

Prototype

void writeFormData(R, PairRange)(
  R dst,
  PairRange pr
)
if (isOutputRange!(R, char) && isTuple!(ElementType!PairRange) && ElementType!PairRange.length == 2);
block ddox.authorsblock ddox.copyrightblock ddox.license
Authors
Copyright
License