# Interfaces 101 : Extensible API Handlers Ep. 10

DevFeed: [Interfaces 101 : Extensible API Handlers Ep. 10](<https://devfeed.tech/articles/interfaces-101-extensible-api-handlers-ep-10-22222.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2023/04/interfaces-101-extensible-api-handlers-ep-10.html>)

Published: 2023-04-03T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [Server](<https://devfeed.tech/topics/server.md>), [Logging](<https://devfeed.tech/topics/logging.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [go](<https://devfeed.tech/tags/go.md>), [golang](<https://devfeed.tech/tags/golang.md>), [handler](<https://devfeed.tech/tags/handler.md>), [http](<https://devfeed.tech/tags/http.md>), [http-server](<https://devfeed.tech/tags/http-server.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [logging](<https://devfeed.tech/tags/logging.md>), [middleware](<https://devfeed.tech/tags/middleware.md>), [request](<https://devfeed.tech/tags/request.md>), [web](<https://devfeed.tech/tags/web.md>)

## AI overview

A video tutorial demonstrates how to build an extensible HTTP API handler in Go. It covers defining a route and handler, designing composable middleware, and implementing logging middleware that measures request time.

## Source excerpt

Introduction In episode 9, Miki discussed how a command flag can be decoded into a user defined type with the Value interface. As a recap, the Value interface consists of two methods: one for serializing the underlying concrete type and one for deserializing a string into an object. To put this interface to the test, Miki wrote a command that had a flag to specify a network address. While implementing the Set method of the Value interface, Miki demonstrated how to add validation for your program's flags.