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

com.artipie.nuget.http.Absent Maven / Gradle / Ivy

There is a newer version: 1.5.5
Show newest version
/*
 * The MIT License (MIT) Copyright (c) 2020-2023 artipie.com
 * https://github.com/artipie/artipie/blob/master/LICENSE.txt
 */
package com.artipie.nuget.http;

import com.artipie.http.Headers;
import com.artipie.http.Response;
import com.artipie.http.rs.RsStatus;
import com.artipie.http.rs.RsWithStatus;
import java.nio.ByteBuffer;
import org.reactivestreams.Publisher;

/**
 * Absent resource, sends HTTP 404 Not Found response to every request.
 *
 * @since 0.1
 */
public final class Absent implements Resource {

    @Override
    public Response get(final Headers headers) {
        return new RsWithStatus(RsStatus.NOT_FOUND);
    }

    @Override
    public Response put(
        final Headers headers,
        final Publisher body) {
        return new RsWithStatus(RsStatus.NOT_FOUND);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy