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

com.fireflysource.net.http.server.impl.matcher.HttpMethodMatcher.kt Maven / Gradle / Ivy

There is a newer version: 5.0.2
Show newest version
package com.fireflysource.net.http.server.impl.matcher

import com.fireflysource.net.http.server.Matcher
import com.fireflysource.net.http.server.Router

class HttpMethodMatcher : AbstractPreciseMatcher() {

    override fun add(rule: String, router: Router) {
        super.add(rule.toUpperCase(), router)
    }

    override fun match(value: String): Matcher.MatchResult? {
        return if (map.isEmpty()) null else super.match(value.toUpperCase())
    }

    override fun getMatchType(): Matcher.MatchType {
        return Matcher.MatchType.METHOD
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy