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

com.artipie.nuget.http.Resource 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.asto.Content;
import com.artipie.http.Headers;
import com.artipie.http.Response;

import java.util.concurrent.CompletableFuture;

/**
 * Resource serving HTTP requests.
 */
public interface Resource {
    /**
     * Serve GET method.
     *
     * @param headers Request headers.
     * @return Response to request.
     */
    CompletableFuture get(Headers headers);

    /**
     * Serve PUT method.
     *
     * @param headers Request headers.
     * @param body    Request body.
     * @return Response to request.
     */
    CompletableFuture put(Headers headers, Content body);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy