Lite RESTful Webservlet

Can anyone give me a quick and dirty account of creating a light-weight
RESTful web-servlet that can be used to pass data and a file or two to
a server. (I’m thinking webrick and maybe JSON could be used?)
Anything to get my mind moving in the right direction…

Thanks,
T.

On 22 Jan 2007, at 22:00, Trans wrote:

Can anyone give me a quick and dirty account of creating a light-
weight
RESTful web-servlet that can be used to pass data and a file or two to
a server. (I’m thinking webrick and maybe JSON could be used?)
Anything to get my mind moving in the right direction…

I’m playing with webrick to try out AJAX at the moment (sans XML). It
sounds like about the right thing for you. Here’s the tutorial I’m
following:

http://microjet.ath.cx/WebWiki/WEBrick.html

I’m intrigued by Tofu and DIV, but the only docs I’ve found these are
either Japanese, or hilarious but unenlightening Google translations :slight_smile:

Benjohn B. wrote:

following:

http://microjet.ath.cx/WebWiki/WEBrick.html

I’m intrigued by Tofu and DIV, but the only docs I’ve found these are
either Japanese, or hilarious but unenlightening Google translations :slight_smile:

Thanks, that was helpful. I got most of what I want in place, but I’m
stuck the upload servlet part. Right now I have the whole file coming
across in a cgi parameter and the file’s name as another cgi parameter,
I know that can’t be right. I think I need multipart form data?

T.

Trans - Camping sounds like a good match for this type of thing.

http://code.whytheluckystiff.net/camping

I used it recently to produce a very simple web service, taking a few
parameters, and passing back valid XML (via Builder).

I’d be happy to discuss it further if you’re interested.

Michael G. wrote:

Trans - Camping sounds like a good match for this type of thing.

http://code.whytheluckystiff.net/camping

I used it recently to produce a very simple web service, taking a few
parameters, and passing back valid XML (via Builder).

I’d be happy to discuss it further if you’re interested.

Hmm. That’s a though, but how lite is Camping? I realease the main
script is pretty small, but what dependencies does it have? Right now
I’m using Webrick, and since that comes with Ruby that’s pretty lite
:wink:

T.

Trans wrote:

Hmm. That’s a though, but how lite is Camping? I realease the main
script is pretty small, but what dependencies does it have? Right now
I’m using Webrick, and since that comes with Ruby that’s pretty lite
:wink:

s/though/thought/
s/realease/realize/

gracious,
T.

Trans wrote:

Trans wrote:

Hmm. That’s a though, but how lite is Camping? I realease the main
script is pretty small, but what dependencies does it have? Right now
I’m using Webrick, and since that comes with Ruby that’s pretty lite
:wink:

s/though/thought/
s/realease/realize/

Since nobody’s replied, this is the first expression of camping:

%w[active_support markaby tempfile uri].map{|l|require l}

There are no other requires, so I guess it’s only active_support and
markaby to worry about.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs