We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b72c2cd commit 24a4f4bCopy full SHA for 24a4f4b
1 file changed
src/Servers/GenHttpServer/Program.cs
@@ -7,10 +7,17 @@
7
8
var port = (args.Length > 0 && ushort.TryParse(args[0], out var p)) ? p : (ushort)8080;
9
10
+var rootMethods = new HashSet<FlexibleRequestMethod>
11
+{
12
+ FlexibleRequestMethod.Get(RequestMethod.Get),
13
+ FlexibleRequestMethod.Get(RequestMethod.Head),
14
+ FlexibleRequestMethod.Get(RequestMethod.Options)
15
+};
16
+
17
var app = Inline.Create()
18
.Post("/echo", (IRequest request) => Echo(request))
19
.Post((Stream body) => RequestContent(body))
- .Any(() => StringContent());
20
+ .On(() => StringContent(), rootMethods);
21
22
return await Host.Create()
23
.Handler(app)
0 commit comments