---
title: "What is RequestDelegate in .NET Core?"  
description: "What is RequestDelegate in .NET Core?"  
author: "Manish Sharma"  
published: 2026-07-16  
updated: 2026-07-16  
canonical: https://answers.mindstick.com/qa/116969/what-is-requestdelegate-in-dot-net-core  
category: "asp.net"  
tags: ["asp.net", ".net programming"]  
reading_time: 2 minutes  

---

# What is RequestDelegate in .NET Core?

## What is RequestDelegate in .NET Core?

## Answers

### Answer by Anubhav Sharma

In simple terms, **RequestDelegate** in .NET Core is a **function that handles an incoming HTTP request**.

Think of it like this:

- A user opens your website.
- The request enters your ASP.NET Core application.
- **RequestDelegate** receives that request and decides what to do with it.

It can either:

- Generate a response and send it back to the user, or
- Pass the request to the next middleware in the pipeline.

### Real-life analogy

Imagine you're at a restaurant.

- A **customer** = HTTP request
- A **waiter** = RequestDelegate
- The waiter either:
- Serves the customer directly, or
- Takes the order to the next person (chef, cashier, etc.).

Similarly, a RequestDelegate either handles the request itself or forwards it to the next middleware.

![What is RequestDelegate in .NET Core?](https://answers.mindstick.com/questionanswer/387ec1c7-3cd4-4b64-a3e6-74e2628395d0/images/602b493d-aee9-4a66-82df-e841c55b81db.jpg)

### Simple example

```cs
app.Run(async context =>
{
    await context.Response.WriteAsync("Hello World!");
});
```

Here, `app.Run()` creates a **RequestDelegate**.

When someone visits the website:

- The request comes in.
- The RequestDelegate runs.
- It writes `"Hello World!"` to the response.
- The request ends.

### Another example with middleware

```cs
app.Use(async (context, next) =>
{
    Console.WriteLine("Before");

    await next(); // Pass request to the next RequestDelegate

    Console.WriteLine("After");
});
```

Here:

- `"Before"` runs first.
- `await next()` sends the request to the next RequestDelegate.
- After the next one finishes, `"After"` runs.

### In one sentence

> **RequestDelegate is a method that processes an HTTP request and either returns a response or passes the request to the next middleware in the ASP.NET Core request pipeline.**


---

Original Source: https://answers.mindstick.com/qa/116969/what-is-requestdelegate-in-dot-net-core

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
