Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aslakhellesoy/webbit-rest
REST support for Webbit based on JAX-WS (JSR 311)
https://github.com/aslakhellesoy/webbit-rest
Last synced: about 1 month ago
JSON representation
REST support for Webbit based on JAX-WS (JSR 311)
- Host: GitHub
- URL: https://github.com/aslakhellesoy/webbit-rest
- Owner: aslakhellesoy
- Created: 2011-02-20T17:04:35.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2012-04-24T16:52:31.000Z (over 12 years ago)
- Last Synced: 2024-04-14T15:13:31.313Z (8 months ago)
- Language: Java
- Homepage:
- Size: 3.62 MB
- Stars: 20
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
*OBSOLETE*
*THIS PROJECT IS NO LONGER MAINTAINED*. PLEASE SEE https://github.com/webbit/webbit-rest FOR A MORE RECENT ALTERNATIVE.
Webbit REST
===========Webbit REST brings JAX-RS (JSR-311) to Webbit. Here is a quick example:
package org.webbitserver.rest;import org.webbitserver.WebServer;
import org.webbitserver.WebServers;
import org.webbitserver.rest.resteasy.ResteasyHandler;import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;public class Main {
@Path("/hello")
public static class HelloResource {
@GET
@Produces("text/plain")
public String get() {
return "Hello";
}
}public static void main(String[] args) throws Exception {
WebServer webServer = WebServers.createWebServer(9877);
webServer.add(new ResteasyHandler(new HelloResource()));
webServer.start();System.out.println("Try this: curl " + webServer.getUri() + "hello");
}
}Webbit-REST uses [RestEasy](http://www.jboss.org/resteasy) under the hood.