Function formMethodHandler

Overload group

Generate a HttpServerRequestDelegate from a generic function with arbitrary arguments. The arbitrary arguments will be filled in with data from the form in req. For details see applyParametersFromAssociativeArrays.

Prototypes

HttpServerRequestDelegate formMethodHandler((DelegateType) if (isCallable!(DelegateType)))(
  DelegateType func
);

See_Also

applyParametersFromAssociativeArrays

Parameters

Parameter nameDescription
delegate Some function, which some arguments which must be constructible from strings with to!ArgType(some_string), except one optional parameter of type HttpServerRequest and one of type HttpServerResponse which are passed over.

Returns

A HttpServerRequestDelegate which passes over any form data to the given function. This is private because untested and I am also not sure whether it a) works and b) if it is useful at all. private

Overload group

Create a delegate handling form data for any matching overload of T.method.

T is some class or struct. Method some probably overloaded method of T. The returned delegate will try all overloads of the passed method and will only raise an error if no conforming overload is found.

Prototypes

HttpServerRequestDelegate formMethodHandler((T,string method))(
  T inst
);

Authors

Sönke Ludwig, Jan Krüger

Copyright

© 2012 RejectedSoftware e.K.

License

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