25 lines
563 B
Java
25 lines
563 B
Java
package com.drinkool.services;
|
|
|
|
import io.smallrye.mutiny.Uni;
|
|
import jakarta.ws.rs.GET;
|
|
import jakarta.ws.rs.POST;
|
|
import jakarta.ws.rs.Path;
|
|
import jakarta.ws.rs.PathParam;
|
|
import jakarta.ws.rs.core.Response;
|
|
|
|
import java.io.File;
|
|
|
|
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
|
|
import org.jboss.resteasy.reactive.RestForm;
|
|
|
|
@RegisterRestClient(configKey = "file")
|
|
@Path("/")
|
|
public interface FileService {
|
|
@POST
|
|
Uni<Response> upload(@RestForm File file);
|
|
|
|
@GET
|
|
@Path("/{name}")
|
|
Uni<Response> get(@PathParam("name") String name);
|
|
}
|