spray/spray — pull request #417 by agemooij (2013-08-03 22:53:17+00:00)
Title: + routing: add scheme directives

I added a new SchemeDirectives trait that allows you to reject routes based on the Uri scheme.This was just something I thought of when thinking about how to redirect all requests for "http" uris to the relevant "https" uris and I think they can be of general use.

I just implemented the `http` and `https` directives plus the generic `scheme` directive they are built upon. Since Spray == HTTP and it doesn't support web sockets yet, I didn't think more schemes were needed.

I updated the documentation with basic directive descriptions in the relevant indexes but I left the detailed documentation for later, mainly due to a lack of any existing examples to use for inspiration :)