-
Notifications
You must be signed in to change notification settings - Fork 675
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[csharp] Add GenHTTP framework (#7984)
* Add GenHTTP framework * Convert /user to POST * Switch to wildcard for minor version of package references
- Loading branch information
1 parent
2ecdc7f
commit 6ac4cae
Showing
4 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using GenHTTP.Engine.Kestrel; | ||
using GenHTTP.Modules.Functional; | ||
|
||
var empty = ""; | ||
|
||
var app = Inline.Create() | ||
.Get(() => empty) | ||
.Get("/user/:id", (string id) => id) | ||
.Post("/user", () => empty); | ||
|
||
return await Host.Create() | ||
.Handler(app) | ||
.Port(3000) | ||
.RunAsync(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
framework: | ||
github: Kaliumhexacyanoferrat/GenHTTP | ||
version: 9.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
|
||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<AssemblyName>web</AssemblyName> | ||
<OutputType>Exe</OutputType> | ||
|
||
<ServerGarbageCollection>true</ServerGarbageCollection> | ||
<TieredPGO>true</TieredPGO> | ||
|
||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="GenHTTP.Core.Kestrel" Version="9.1.*" /> | ||
<PackageReference Include="GenHTTP.Modules.Functional" Version="9.1.*" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -196,6 +196,8 @@ csharp: | |
- jchannon | ||
simplify.web: | ||
- i4004 | ||
genhttp: | ||
- Kaliumhexacyanoferrat | ||
cpp: | ||
drogon: | ||
- an-tao | ||
|