Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebApiCatchAll

A minimal ASP.NET Core 8 utility that registers a single catch-all route across all HTTP methods (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS). Useful for local development, webhook inspection, and end-to-end testing — any request path and body is echoed back as a readable response.

Features

  • Matches any URL path via /{*slug}
  • Accepts any of the standard HTTP verbs
  • If a JSON body is provided it is pretty-echoed alongside the path
  • Structured logging via Serilog with console and file sinks
  • Full HTTP request/response logging via Microsoft.AspNetCore.HttpLogging

Getting Started

Prerequisites

Run locally

git clone https://github.com/JerrettDavis/WebApiCatchAll.git
cd WebApiCatchAll
dotnet run --project WebApiCatchAll

The app starts on http://localhost:5000 (or the port shown in the console). Send any request:

curl http://localhost:5000/hello/world
# Hello hello/world!

curl -X POST http://localhost:5000/api/test \
     -H "Content-Type: application/json" \
     -d '{"key":"value"}'
# Hello api/test! Here's your body:
# {"key":"value"}

Configuration

Logging behaviour is controlled via appsettings.json / appsettings.Development.json using the standard Serilog configuration extension.

License

MIT

About

ASP.NET Core 8 Minimal API that catches all HTTP requests on any route and method, logging them with Serilog. Useful for debugging webhooks and inspecting HTTP traffic.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages