com.hexagonkt.http.patterns.LiteralPathPattern.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http Show documentation
Show all versions of http Show documentation
HTTP classes. These classes are shared among the HTTP client and the HTTP server.
The newest version!
package com.hexagonkt.http.patterns
data class LiteralPathPattern(
override val pattern: String = "",
override val prefix: Boolean = false
) : PathPattern {
init {
checkPathPatternPrefix(pattern)
}
override fun addPrefix(prefix: String?): PathPattern =
if (prefix == null) this
else createPathPattern(prefix + pattern, this.prefix)
override fun matches(requestUrl: String): Boolean =
if (prefix) requestUrl.startsWith(pattern)
else requestUrl == pattern
override fun extractParameters(requestUrl: String): Map =
emptyMap()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy