com.github.fntzr.spray.routing

ext

package ext

Visibility
  1. Public
  2. All

Type Members

  1. trait BaseController extends AnyRef

    A BaseController trait

    A BaseController trait

    It a top hierarchy controllers. You can extend own controller with this trait.

    trait MyController extends BaseController {
    //you actions ...
    }

    Trait contain request method, which contatin information about current request. You might use in controller actions:

    trait MyController extends BaseController {
     def index = {
      if (request.method == GET) {
        //do something
      } else {
        //do otherwise
      }
    }
    }
  2. trait Helpers extends AnyRef

    Provides implicits for String and spray.

    Provides implicits for String and spray.routing.PathMatcher

    get0[Controller]("index" ~> "my_index_method")
    get0[Controller](("show" / IntNumer) ~> "my_show_method")
  3. trait HttpFormSupport extends AnyRef

    Base trait, which add form to model serialization

  4. trait HttpHelpers extends AnyRef

    Contain a route helpers

  5. trait HttpMethods extends AnyRef

    Trait contain http methods realisation

  6. trait RespondToSupport extends AnyRef

  7. trait Routable extends HttpService with HttpMethods with HttpHelpers with Helpers with HttpFormSupport

    Trait, which contain methods for resourse implementation.

    Trait, which contain methods for resourse implementation. With resourse method you might quick create routes for you controller. Also map form information onto Model.

    resourse[Controller, Model]

    transform to

    pathPrefix("model") {
    //methods for controller.index
    // controller.show
    // ...
    }

    Note: for new method in controller use fresh name.

Value Members

  1. object exclude

    Object for transformation String* into List

    Object for transformation String* into List

    exclude("index")

Ungrouped