Simple rest server

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Simple rest server

Guillermo Polito
Maybe it's useful for someone.

A very very very simple rest server which converts

http://localhost:8090/look/at/this/in/1

into

mainResource look at this in at: 1


I did it in half an hour so it's no comments nor documentation :P.  The repo is free to write ;)

Guille


---------- Forwarded message ----------
From: Guillermo Polito <[hidden email]>
Date: Fri, Jun 3, 2011 at 1:26 PM
Subject: mira mira
To: Montonero <[hidden email]>


Gofer it
    squeaksource: 'MetacelloRepository';
    package: 'ConfigurationOfKomHttpServer';
    load.
   
(ConfigurationOfKomHttpServer project version: #stable) load

Gofer it
    squeaksource: 'SimpleRestServer';
    package: 'SimpleRestServer';
    package: 'SimpleRestServerExample';
    load.

"To Start:"

SRSHttpRestService new
    mainResource: (SRSExample new);
    startOn: 8090.

"Then web browse:

http://localhost:8090/look/
http://localhost:8090/look/something
http://localhost:8090/look/at/
http://localhost:8090/look/at/this/
http://localhost:8090/look/at/this/example/
http://localhost:8090/look/at/this/in/1
http://localhost:8090/look/at/this/example/1

"