org.zalando.riptide.idempotency.IdempotencyKeyIdempotencyDetector Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of riptide-idempotency Show documentation
Show all versions of riptide-idempotency Show documentation
Client side response routing
package org.zalando.riptide.idempotency;
import org.apiguardian.api.API;
import org.zalando.riptide.RequestArguments;
import static org.apiguardian.api.API.Status.EXPERIMENTAL;
/**
* @see Stripe API: Idempotent Requests
*/
@API(status = EXPERIMENTAL)
public final class IdempotencyKeyIdempotencyDetector implements IdempotencyDetector {
@Override
public Decision test(final RequestArguments arguments, final Test root) {
return arguments.getHeaders().containsKey("Idempotency-Key") ?
Decision.ACCEPT : Decision.NEUTRAL;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy