<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Components on Dapr Docs</title><link>https://v1-18.docs.dapr.io/developing-applications/develop-components/</link><description>Recent content in Components on Dapr Docs</description><generator>Hugo</generator><language>en</language><atom:link href="https://v1-18.docs.dapr.io/developing-applications/develop-components/index.xml" rel="self" type="application/rss+xml"/><item><title>How to: Author middleware components</title><link>https://v1-18.docs.dapr.io/developing-applications/develop-components/develop-middleware/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/developing-applications/develop-components/develop-middleware/</guid><description>&lt;p>Dapr allows custom processing pipelines to be defined by chaining a series of middleware components. In this guide, you&amp;rsquo;ll learn how to create a middleware component. To learn how to configure an existing middleware component, see &lt;a href="https://v1-18.docs.dapr.io/operations/components/middleware/">Configure middleware components&lt;/a>&lt;/p>
&lt;h2 id="writing-a-custom-http-middleware">Writing a custom HTTP middleware&lt;/h2>
&lt;p>HTTP middlewares in Dapr wrap standard Go &lt;a href="https://pkg.go.dev/net/http">net/http&lt;/a> handler functions.&lt;/p>
&lt;p>Your middleware needs to implement a middleware interface, which defines a &lt;strong>GetHandler&lt;/strong> method that returns a &lt;a href="https://pkg.go.dev/net/http#Handler">&lt;strong>http.Handler&lt;/strong>&lt;/a> callback and an &lt;strong>error&lt;/strong>:&lt;/p></description></item></channel></rss>