# Comparison of net/http and httprouter

DevFeed: [Comparison of net/http and httprouter](<https://devfeed.tech/articles/comparison-of-net-http-and-httprouter-39609.md>)

Original publisher: [Read original article](<https://www.gauravsarma.com/posts/2019-05-23_Comparison-of-net-http-and-httprouter-df8edd1004e7>)

Published: 2019-05-23T00:00:00Z

Content type: comparison

Language: en

Sources: [Gaurav Sarma's Blog](<https://devfeed.tech/sources/gaurav-sarma-s-blog.md>)

Topics: [HTTP](<https://devfeed.tech/topics/http.md>), [Routing (disambiguation)](<https://devfeed.tech/topics/routing.md>), [Go Language](<https://devfeed.tech/topics/go-language.md>), [Framework](<https://devfeed.tech/topics/framework.md>)

Tags: [comparison](<https://devfeed.tech/tags/comparison.md>), [go](<https://devfeed.tech/tags/go.md>), [http](<https://devfeed.tech/tags/http.md>), [router](<https://devfeed.tech/tags/router.md>), [routers](<https://devfeed.tech/tags/routers.md>), [routing](<https://devfeed.tech/tags/routing.md>)

## AI overview

This article compares HTTP request routers in Go's standard net/http package and the httprouter package. It explains how net/http maps URI patterns to handlers and how httprouter uses compact prefix trees for routing.

## Source excerpt

This post will mainly revolve around the comparison between different implementations of Routers in the HTTP based frameworks. Let's first go over what routers are in the context of a HTTP framework...