Hi,
I wrote a proof-of-concept Monticello server implementation called MCWebServer, using WebServer from Andreas Raab's WebClient package. I think this is a nice example of how to use WebServer for something useful and real. It also documents the MC HTTP client/server protocol with working code. It is available from http://www.squeaksource.com/ADayAtTheBeach as WebClient-Monticello.x.n.mcz.
Load the code using Gofer (the code was written in Pharo but should be portable) (alternatively use Installer or do it manually):
Gofer new squeaksource: 'WebClient'; package: 'WebClient-Core'; load. Gofer new squeaksource: 'ADayAtTheBeach'; package: 'WebClient-Monticello'; load.
Setting up your own minimal MC source code repository is now very easy:
(MCWebServer reset default) directory: (FileDirectory on: '/tmp/monticello/'); addUser: 'john' withPassword: 'secret'; listenOn: 8800.
Make sure the specified directory exists. Choose a server port that is unused.
Access with the following specification:
MCHttpRepository location: 'http://localhost:8800' user: 'john' password: 'secret'.
Enjoy,
Sven
-- Sven Van Caekenberghe - http://homepage.mac.com/svc Beta Nine - software engineering - http://www.beta9.be
Hi:
Thanks by share. I will take a look as soon as I can.
In the maintime want to ask if you have extended/implemented on WebClient the possibility of make post's with multipart/form-data (See my mail of yesterday with subject: "Using WebClient").
Cheers. Germán.
2010/6/22 Sven Van Caekenberghe sven@beta9.be:
Hi,
I wrote a proof-of-concept Monticello server implementation called MCWebServer, using WebServer from Andreas Raab's WebClient package. I think this is a nice example of how to use WebServer for something useful and real. It also documents the MC HTTP client/server protocol with working code. It is available from http://www.squeaksource.com/ADayAtTheBeach as WebClient-Monticello.x.n.mcz.
Load the code using Gofer (the code was written in Pharo but should be portable) (alternatively use Installer or do it manually):
Gofer new squeaksource: 'WebClient'; package: 'WebClient-Core'; load. Gofer new squeaksource: 'ADayAtTheBeach'; package: 'WebClient-Monticello'; load.
Setting up your own minimal MC source code repository is now very easy:
(MCWebServer reset default) directory: (FileDirectory on: '/tmp/monticello/'); addUser: 'john' withPassword: 'secret'; listenOn: 8800.
Make sure the specified directory exists. Choose a server port that is unused.
Access with the following specification:
MCHttpRepository location: 'http://localhost:8800' user: 'john' password: 'secret'.
Enjoy,
Sven
-- Sven Van Caekenberghe - http://homepage.mac.com/svc Beta Nine - software engineering - http://www.beta9.be
Hi Germán,
I never wrote code to do the client side of a multipart/form-data encoded post, but I did do the server part (in Common Lisp), although it was a long time ago. Furthermore I remember that it was a bit of a mess ;-)
But looking at the Drakma Common Lisp web client documentation ( http://www.weitz.de/drakma/#form-data ) it seems as if they are doing what you are looking for, which would essentially be a mix between your code and Andreas' form post code: i.e. combine parameters with files in one post using another encoding.
Still, you will always have to known upfront which fields are expected.
Maybe if I have some time I will look into it, but I can't promise anything.
Sven
On 23 Jun 2010, at 01:24, Germán Arduino wrote:
Hi:
Thanks by share. I will take a look as soon as I can.
In the maintime want to ask if you have extended/implemented on WebClient the possibility of make post's with multipart/form-data (See my mail of yesterday with subject: "Using WebClient").
Cheers. Germán.
2010/6/22 Sven Van Caekenberghe sven@beta9.be:
Hi,
I wrote a proof-of-concept Monticello server implementation called MCWebServer, using WebServer from Andreas Raab's WebClient package. I think this is a nice example of how to use WebServer for something useful and real. It also documents the MC HTTP client/server protocol with working code. It is available from http://www.squeaksource.com/ADayAtTheBeach as WebClient-Monticello.x.n.mcz.
Load the code using Gofer (the code was written in Pharo but should be portable) (alternatively use Installer or do it manually):
Gofer new squeaksource: 'WebClient'; package: 'WebClient-Core'; load. Gofer new squeaksource: 'ADayAtTheBeach'; package: 'WebClient-Monticello'; load.
Setting up your own minimal MC source code repository is now very easy:
(MCWebServer reset default) directory: (FileDirectory on: '/tmp/monticello/'); addUser: 'john' withPassword: 'secret'; listenOn: 8800.
Make sure the specified directory exists. Choose a server port that is unused.
Access with the following specification:
MCHttpRepository location: 'http://localhost:8800' user: 'john' password: 'secret'.
Enjoy,
Sven
-- Sven Van Caekenberghe - http://homepage.mac.com/svc Beta Nine - software engineering - http://www.beta9.be
Hi Sven:
2010/6/23 Sven Van Caekenberghe sven@beta9.be:
Hi Germán,
I never wrote code to do the client side of a multipart/form-data encoded post, but I did do the server part (in Common Lisp), although it was a long time ago. Furthermore I remember that it was a bit of a mess ;-)
Same here :)
But looking at the Drakma Common Lisp web client documentation ( http://www.weitz.de/drakma/#form-data ) it seems as if they are doing what you are looking for, which would essentially be a mix between your code and Andreas' form post code: i.e. combine parameters with files in one post using another encoding.
Still, you will always have to known upfront which fields are expected.
Exactly, I was thinking if could find some way of read the form first, and then ask by the needed fields.
And thanks by the link, I'm reading ....
Cheers. Germán.
Maybe if I have some time I will look into it, but I can't promise anything.
Sven
On 23 Jun 2010, at 01:24, Germán Arduino wrote:
Hi:
Thanks by share. I will take a look as soon as I can.
In the maintime want to ask if you have extended/implemented on WebClient the possibility of make post's with multipart/form-data (See my mail of yesterday with subject: "Using WebClient").
Cheers. Germán.
2010/6/22 Sven Van Caekenberghe sven@beta9.be:
Hi,
I wrote a proof-of-concept Monticello server implementation called MCWebServer, using WebServer from Andreas Raab's WebClient package. I think this is a nice example of how to use WebServer for something useful and real. It also documents the MC HTTP client/server protocol with working code. It is available from http://www.squeaksource.com/ADayAtTheBeach as WebClient-Monticello.x.n.mcz.
Load the code using Gofer (the code was written in Pharo but should be portable) (alternatively use Installer or do it manually):
Gofer new squeaksource: 'WebClient'; package: 'WebClient-Core'; load. Gofer new squeaksource: 'ADayAtTheBeach'; package: 'WebClient-Monticello'; load.
Setting up your own minimal MC source code repository is now very easy:
(MCWebServer reset default) directory: (FileDirectory on: '/tmp/monticello/'); addUser: 'john' withPassword: 'secret'; listenOn: 8800.
Make sure the specified directory exists. Choose a server port that is unused.
Access with the following specification:
MCHttpRepository location: 'http://localhost:8800' user: 'john' password: 'secret'.
Enjoy,
Sven
-- Sven Van Caekenberghe - http://homepage.mac.com/svc Beta Nine - software engineering - http://www.beta9.be
Hi Sven -
Thanks for MCWebServer - I think that this is a *great* example for the use of WebServer that's both educational and practically useful. Also, thanks for your comments and suggestions - all of these are very welcome.
Cheers, - Andreas
On 6/22/2010 2:54 PM, Sven Van Caekenberghe wrote:
Hi,
I wrote a proof-of-concept Monticello server implementation called MCWebServer, using WebServer from Andreas Raab's WebClient package. I think this is a nice example of how to use WebServer for something useful and real. It also documents the MC HTTP client/server protocol with working code. It is available from http://www.squeaksource.com/ADayAtTheBeach as WebClient-Monticello.x.n.mcz.
Load the code using Gofer (the code was written in Pharo but should be portable) (alternatively use Installer or do it manually):
Gofer new squeaksource: 'WebClient'; package: 'WebClient-Core'; load. Gofer new squeaksource: 'ADayAtTheBeach'; package: 'WebClient-Monticello'; load.
Setting up your own minimal MC source code repository is now very easy:
(MCWebServer reset default) directory: (FileDirectory on: '/tmp/monticello/'); addUser: 'john' withPassword: 'secret'; listenOn: 8800.
Make sure the specified directory exists. Choose a server port that is unused.
Access with the following specification:
MCHttpRepository location: 'http://localhost:8800' user: 'john' password: 'secret'.
Enjoy,
Sven
-- Sven Van Caekenberghe - http://homepage.mac.com/svc Beta Nine - software engineering - http://www.beta9.be
On Tue, 22 Jun 2010, Sven Van Caekenberghe wrote:
Hi,
I wrote a proof-of-concept Monticello server implementation called MCWebServer, using WebServer from Andreas Raab's WebClient package. I think this is a nice example of how to use WebServer for something useful and real. It also documents the MC HTTP client/server protocol with working code. It is available from http://www.squeaksource.com/ADayAtTheBeach as WebClient-Monticello.x.n.mcz.
Load the code using Gofer (the code was written in Pharo but should be portable) (alternatively use Installer or do it manually):
Gofer new squeaksource: 'WebClient'; package: 'WebClient-Core'; load. Gofer new squeaksource: 'ADayAtTheBeach'; package: 'WebClient-Monticello'; load.
Setting up your own minimal MC source code repository is now very easy:
(MCWebServer reset default) directory: (FileDirectory on: '/tmp/monticello/'); addUser: 'john' withPassword: 'secret'; listenOn: 8800.
Make sure the specified directory exists. Choose a server port that is unused.
Access with the following specification:
MCHttpRepository location: 'http://localhost:8800' user: 'john' password: 'secret'.
Thanks, this seems to be a nice and simple replacement of SqueakSource for small projects.
Levente
Enjoy,
Sven
-- Sven Van Caekenberghe - http://homepage.mac.com/svc Beta Nine - software engineering - http://www.beta9.be
squeak-dev@lists.squeakfoundation.org