Title: Add a default handler · Issue #16 · Code-Sharp/uHttpSharp · GitHub
Open Graph Title: Add a default handler · Issue #16 · Code-Sharp/uHttpSharp
X Title: Add a default handler · Issue #16 · Code-Sharp/uHttpSharp
Description: In some scenarios we want to use to built-in handlers without needing to specify any custom handlers. Unfortunately, this kind of usage will throw a NullReferenceException. using (var httpServer = new HttpServer(new HttpRequestProvider()...
Open Graph Description: In some scenarios we want to use to built-in handlers without needing to specify any custom handlers. Unfortunately, this kind of usage will throw a NullReferenceException. using (var httpServer = ...
X Description: In some scenarios we want to use to built-in handlers without needing to specify any custom handlers. Unfortunately, this kind of usage will throw a NullReferenceException. using (var httpServer = ...
Opengraph URL: https://github.com/Code-Sharp/uHttpSharp/issues/16
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add a default handler","articleBody":"In some scenarios we want to use to built-in handlers without needing to specify any custom handlers. Unfortunately, this kind of usage will throw a NullReferenceException. \n\n``` csharp\nusing (var httpServer = new HttpServer(new HttpRequestProvider()))\n{\n httpServer.Use(new TcpListenerAdapter(new TcpListener(IPAddress.Any, 80)));\n\n httpServer.Use(new FileHandler());\n\n // I don't want to write this line.\n httpServer.Use((context, next) =\u003e Task.Factory.GetCompleted());\n\n httpServer.Start(); \n}\n```\n\nI suggest adding a default handler that returns Task.Factory.GetCompleted(), or at least throws a more indicative exception.\n\nElad\n","author":{"url":"https://github.com/darkl","@type":"Person","name":"darkl"},"datePublished":"2015-07-12T21:20:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/16/uHttpSharp/issues/16"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:69c0726b-8cec-71cb-fcea-5eb8c44e9a9e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D112:1625C5:9F1D2CE:CDFF18B:69763586 |
| html-safe-nonce | 6d2f8867946fa6047288535ce69f4ecc3340159a164175c05c817d4e842761f2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTEyOjE2MjVDNTo5RjFEMkNFOkNERkYxOEI6Njk3NjM1ODYiLCJ2aXNpdG9yX2lkIjoiNDYxMTM1MzUzODE4ODQyNDU4MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 67c7472b234d884084c4917ae5ff5f2ab0dae2ae51b32deb764af38c2b595c7e |
| hovercard-subject-tag | issue:94600157 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/Code-Sharp/uHttpSharp/16/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f1c3e38f3eac4ce532139f1773a3563ec1541e5c3e4f5d5f90c01fdb89000397/Code-Sharp/uHttpSharp/issues/16 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f1c3e38f3eac4ce532139f1773a3563ec1541e5c3e4f5d5f90c01fdb89000397/Code-Sharp/uHttpSharp/issues/16 |
| og:image:alt | In some scenarios we want to use to built-in handlers without needing to specify any custom handlers. Unfortunately, this kind of usage will throw a NullReferenceException. using (var httpServer = ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | darkl |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6814b4cc7afd45cd6e64525d0cff0e76dd802f315a5b0e55a7abda1d1d070d0 |
| turbo-cache-control | no-preview |
| go-import | github.com/Code-Sharp/uHttpSharp git https://github.com/Code-Sharp/uHttpSharp.git |
| octolytics-dimension-user_id | 7625607 |
| octolytics-dimension-user_login | Code-Sharp |
| octolytics-dimension-repository_id | 15547297 |
| octolytics-dimension-repository_nwo | Code-Sharp/uHttpSharp |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 2642421 |
| octolytics-dimension-repository_parent_nwo | bonesoul/uhttpsharp |
| octolytics-dimension-repository_network_root_id | 2642421 |
| octolytics-dimension-repository_network_root_nwo | bonesoul/uhttpsharp |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4ea235bfed58ef16c8a5642b3ac64b74f10c9f52 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width