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

com.gravity.gdk.util.http.RichHttpServletRequestT.scala Maven / Gradle / Ivy

The newest version!
package com.gravity.gdk.util.http

import javax.servlet.http.HttpServletRequest

/*
              ___...---''
  ___...---'\'___
''       _.-''  _`'.______\\.
        /_.)  )..-  __..--'\\
       (    __..--''
        '-''\@


 Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ Ⓐ
*/

trait RichHttpServletRequestT {
  implicit class RichHttpServletRequest(request: HttpServletRequest) {
    def getRequestURLWithQueryString: String = {
      val url = request.getRequestURL

      for(qs <- Option(request.getQueryString) if qs.nonEmpty)
        url.append('?').append(qs)

      url.toString
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy