Karve app icon

Karve

ASP.NET Core aspnet-core-minimal-api-crud.http

ASP.NET Core Minimal API CRUD .http example

Exercise a typical Minimal API todo resource from create through delete without leaving the repository.

aspnet-core-minimal-api-crud.http

@baseUrl = https://localhost:7001
@todoId = 1

### List todos
GET {{baseUrl}}/todos
Accept: application/json

### Create a todo
POST {{baseUrl}}/todos
Content-Type: application/json

{
  "title": "Review the API",
  "isComplete": false
}

### Read one todo
GET {{baseUrl}}/todos/{{todoId}}
Accept: application/json

### Update one todo
PUT {{baseUrl}}/todos/{{todoId}}
Content-Type: application/json

{
  "id": 1,
  "title": "Review the API",
  "isComplete": true
}

### Delete one todo
DELETE {{baseUrl}}/todos/{{todoId}}

Variables to replace

baseUrl
Your ASP.NET Core HTTPS launch URL.
todoId
An existing todo ID used by read, update, and delete requests.

Expected response

List and read requests normally return 200 OK, create returns 201 Created, update returns 200 or 204, and delete returns 204 No Content. Your route design may differ.

Related examples and guides

Learn the full syntax in the .http file format guide, manage secrets with variables and environments, or see how to run .http files on Windows.

Launch Summer Sale

Run this request without leaving Windows.

Karve opens .http files as a native workspace: edit the plain text, press Run, inspect the response, and keep the file in Git.

15-day free trial · No account · No subscription · No metered requests

25% off until Sep 1