-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce a mechnism to print additional response information in tests
- Loading branch information
1 parent
4daf31e
commit d943999
Showing
43 changed files
with
214 additions
and
191 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
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
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 |
---|---|---|
@@ -1,34 +1,11 @@ | ||
using System.Collections.Generic; | ||
using GenHTTP.Engine; | ||
|
||
using GenHTTP.Engine; | ||
|
||
using GenHTTP.Modules.Functional; | ||
using GenHTTP.Modules.Layouting; | ||
using GenHTTP.Modules.IO; | ||
using GenHTTP.Modules.Practices; | ||
using GenHTTP.Modules.Security; | ||
|
||
var books = new List<Book>() | ||
{ | ||
new Book(1, "Lord of the Rings") | ||
}; | ||
|
||
var bookApi = Inline.Create() | ||
.Get(() => books) // GET http://localhost:8080/books/ | ||
.Put((Book book) => books.Add(book)); // PUT http://localhost:8080/books/ | ||
|
||
var content = Layout.Create() | ||
.Add("books", bookApi) | ||
.Add(CorsPolicy.Permissive()); | ||
|
||
return Host.Create() | ||
.Handler(content) | ||
.Defaults() | ||
.Console() | ||
//-:cnd:noEmit | ||
#if DEBUG | ||
.Development() | ||
#endif | ||
//+:cnd:noEmit | ||
.Run(); | ||
|
||
record class Book(int ID, string Title); | ||
Host.Create() | ||
.Handler(Content.From(Resource.FromString("Hello World"))) | ||
.Defaults() | ||
.Development() | ||
.Console() | ||
.Run(); |
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.