Practical .http file examples
Copy a request, download the file, replace the safe placeholders, and run it beside your code. Every recipe uses the syntax Karve actually supports and stays portable as plain text.
Authentication
Bearer token .http file example
Send a JWT or OAuth access token exactly as the API receives it: in an Authorization header.
Basic authentication .http file example
Keep Basic credentials readable while editing and let Karve encode the username and password when it sends the request.
API key header .http file example
Use this pattern when the provider expects an API key in a custom request header.
API key query parameter .http example
Use a query-string key only when the API provider requires it; headers keep credentials out of logs more reliably.
OAuth client credentials .http file example
Request a machine-to-machine access token directly from an OAuth token endpoint.
OAuth refresh token .http file example
Call the token endpoint with refresh_token when an access token expires without repeating the full sign-in flow.
ASP.NET Core
ASP.NET Core Minimal API CRUD .http example
Exercise a typical Minimal API todo resource from create through delete without leaving the repository.
ASP.NET Core JWT login .http example
Run a JSON login, inspect the returned JWT, then test a protected endpoint with the bearer header.
ASP.NET Core validation errors .http example
Keep deliberately invalid requests beside the API so validation behavior remains easy to reproduce.
ASP.NET Core form-urlencoded .http example
Test endpoints that bind HTML-style form fields without building a browser form.
ASP.NET Core health check .http example
Check liveness, readiness, and response headers with requests that work well during local development and incident diagnosis.
ASP.NET Core pagination .http example
Exercise predictable paging and filtering cases without repeatedly editing a long URL.
Everyday requests
Create and fetch a resource .http example
Keep a create-and-read workflow together while making the one manual value transfer explicit.
.http environment variables example
Reuse the same committed requests across local, staging, and production values while secrets stay outside the file.
JSON POST request .http file example
Send a structured JSON body with explicit content negotiation and a reusable base URL.
Keep useful API requests beside your code.
Open any recipe in Karve, run it natively on Windows, and keep the reviewed file in Git with the project it tests.
15-day free trial · No account · No subscription · No metered requests
25% off until Sep 1