All Downloads are FREE. Search and download functionalities are using the official Maven repository.

skinny.micro.base.QueryParamsAccessor.scala Maven / Gradle / Ivy

package skinny.micro.base

import skinny.micro.context.SkinnyContext
import skinny.micro.{ SkinnyMicroBase, MultiParams, Params, SkinnyMicroParams }

/**
 * Provides queryParams/queryMultiParams.
 */
trait QueryParamsAccessor { self: SkinnyMicroBase =>

  /**
   * Returns query string multi parameters as a Map value.
   */
  def queryMultiParams(implicit ctx: SkinnyContext): MultiParams = {
    new MultiParams(skinny.micro.rl.MapQueryString.parseString(ctx.request.queryString))
  }

  /**
   * Returns query string parameters as a Map value.
   */
  def queryParams(implicit ctx: SkinnyContext): Params = new SkinnyMicroParams(queryMultiParams(ctx))

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy