Skip to content
Snippets Groups Projects
CourseClient.java 472 B
package java2.lab12.client;

import java.util.Collection;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

@Path("/")
public interface CourseClient {

	@GET
	@Path("courses/")
	@Produces(MediaType.APPLICATION_JSON)
	Collection<Course> getCourses();

	@POST
	@Path("course/")
	@Consumes(MediaType.APPLICATION_JSON)
	Long createCourse(Course course);

}