vibe.d beta banner
get vibe.d
0.9.7

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

writeFormBody - multiple declarations

Function writeFormBody

Writes a HTTPClientRequest body as URL encoded form data.

void writeFormBody (
  HTTPClientRequest req,
  in const(string[string]) form
);

Example

import vibe.core.log;
import vibe.http.client;
import vibe.http.form;
import vibe.stream.operations;

void sendForm()
{
	requestHTTP(

Function writeFormBody

Writes a HTTPClientRequest body as URL encoded form data.

void writeFormBody(PairRange) (
  HTTPClientRequest req,
  PairRange form
)
if (isTuple!(ElementType!PairRange)!&& (ElementType!PairRange.length == 2));

Parameters

NameDescription
req Request object to write to.
form range of t = Tuple!(string, string), where t[0] is the name and t[1] the value of a form entry.

Example

import vibe.core.log;
import vibe.http.client;
import vibe.http.form;
import vibe.stream.operations;
import std.range;

void sendForm()
{
	string[] oames = [
Authors

Sönke Ludwig, Jan Krüger

Copyright

© 2012-2015 Sönke Ludwig

License

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