Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show list of all routes in Akka HTTP

I have a small Akka Http server. Is there a way of listing all server routes/services?

like image 455
bashan Avatar asked Jul 18 '16 13:07

bashan


People also ask

What is directive in Akka HTTP?

A “Directive” is a small building block used for creating arbitrarily complex route structures. Akka HTTP already pre-defines a large number of directives and you can easily construct your own: Basics. Structure.

What is DSL in Akka?

The Akka HTTP Core Server API provides a Flow - or Function -level interface that allows an application to respond to incoming HTTP requests by mapping requests to responses (excerpt from Low-level server side example): Scala.

Is Akka HTTP async?

Akka HTTP also provides an embedded, Reactive-Streams-based, fully asynchronous HTTP/1.1 server implemented on top of Streams.

How does akka HTTP work?

Akka HTTP is made for building integration layers based on HTTP and as such tries to “stay on the sidelines”. Therefore you normally don't build your application “on top of” Akka HTTP, but you build your application on top of whatever makes sense and use Akka HTTP merely for the HTTP integration needs.


1 Answers

Currently this isn't simple without creating your own wrapper around the akka-http Scala DSL. More discussion here: https://github.com/akka/akka-http/issues/201

Long story short the Scala DSL isn't conducive to introspection.

like image 124
Kevin Avatar answered Oct 11 '22 07:10

Kevin