[Pharo-project] Simple rest server

Guillermo Polito guillermopolito at gmail.com
Fri Jun 3 19:33:56 CEST 2011


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 <guillermopolito at gmail.com>
Date: Fri, Jun 3, 2011 at 1:26 PM
Subject: mira mira
To: Montonero <santiagobragagnolo at gmail.com>


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

"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/pharo-project/attachments/20110603/1f0743f1/attachment.htm>


More information about the Pharo-project mailing list