com.github.tonivade.zeromock.api.URIORequestHandler Maven / Gradle / Ivy
/*
* Copyright (c) 2018-2020, Antonio Gabriel Muñoz Conejo
* Distributed under the terms of the MIT License
*/
package com.github.tonivade.zeromock.api;
import static com.github.tonivade.purefun.effect.URIOOf.toURIO;
import com.github.tonivade.purefun.Kind;
import com.github.tonivade.purefun.effect.URIO;
import com.github.tonivade.purefun.effect.URIO_;
import com.github.tonivade.purefun.instances.URIOInstances;
public interface URIORequestHandler extends RequestHandlerK> {
@Override
default URIO apply(HttpRequest value) {
return RequestHandlerK.super.apply(value).fix(toURIO());
}
default URIORequestHandler preHandle(URIOPreFilter before) {
return RequestHandlerK.super.preHandle(URIOInstances.monad(), before)::apply;
}
default URIORequestHandler postHandle(URIOPostFilter after) {
return RequestHandlerK.super.postHandle(URIOInstances.monad(), after)::apply;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy