HttpRouter is a lightweight high performance HTTP request router (also called multiplexer or just mux for short) for Go. In contrast to the default mux of Go's net/http package, this router supports variables in the routing pattern and matches against the request method. It also scales better. The router is optimized for high performance and a small memory footprint. It scales well even with very long paths and a large number of routes. A compressing dynamic trie (radix tree) structure is used for efficient matching. With other routers, like http.ServeMux, a requested URL path could match multiple patterns. Therefore they have some awkward pattern priority rules, like longest match or first registered, first matched. By design of this router, a request can only match exactly one or no route. As a result, there are also no unintended matches, which makes it great for SEO and improves the user experience.

Features

  • Stop caring about trailing slashes
  • The router can fix wrong cases and remove superfluous path elements
  • Stop parsing the requested URL path, just give the path segment a name and the router delivers the dynamic value to you
  • The matching and dispatching process generates zero bytes of garbage
  • You can set a Panic handler to deal with panics occurring during handling a HTTP request
  • The router design encourages to build sensible, hierarchical RESTful APIs

Project Samples

Project Activity

See All Activity >

Categories

Router

License

BSD License

Follow HttpRouter

HttpRouter Web Site

Other Useful Business Software
Go beyond a virtual data room with Datasite Diligence Icon
Go beyond a virtual data room with Datasite Diligence

Datasite Diligence, helps dealmakers in more than 170 countries close more deals, faster.

The data room with a view. Evolved for next-generation M&A. Built on decades of deal experience. Packed with expert tools, yet intuitive for novices. A fully mobile platform with frictionless processes. Smart AI tools that let you close more deals, faster, plus end-to-end support at all times. Do due diligence with intelligence.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of HttpRouter!

Additional Project Details

Programming Language

Go

Related Categories

Go Router Firmware

Registered

2021-05-07