public MainModule() { Post("/postProtoBuf", args => { User data = this.Bind(); return Negotiate.WithModel(data); }); Get("/getProtoBuf/{name}/{age}", args => { var data = new User { Name = args.name, Age = args.age }; return Negotiate.WithModel(data); }); }
public MainModule() { Post["/postProtoBuf"] = x => { User data = this.Bind(); return new ProtoBufResponse(data); }; Get["/getProtoBuf/{name}/{age}"] = parameters => { var data = new User { Name = parameters.name, Age = parameters.age }; return new ProtoBufResponse(data); }; }