- From: Mark Baker <distobj@acm.org>
- Date: Wed, 8 Jun 2005 15:52:36 -0400
- To: public-web-http-desc@w3.org
Looks good, Danny. I was thinking of use cases at a higher level (i.e. avoiding the message trace, at least for now 8-), but that still captures what I think is important (though you might want to check your math on that first one 8-). FWIW, those are the kinds of use cases that forms languages are targetted at addressing. Does anybody else have some use cases supporting code generation requirements? Mark. On Mon, Jun 06, 2005 at 08:01:14AM +0200, Danny Ayers wrote: > On 6/6/05, Mark Baker <distobj@acm.org> wrote: > > > > I wonder if some use cases for the description language aren't in order? > > How about starting with something minimal? I've probably got errors > in the syntax, but just for a general idea - > > Service 1P: > A GET at http://example.com/divide with the query part of the URI > containing two values, x and y, will produce a response with the body > containing x/y. > e.g. > > -Request- > GET /divide?x=6&y=2 HTTP/1.1 > example.com > Accept: text/plain > --------- > > -Response- > HTTP/1.1 200 OK > Content-Type: text/plain > > 2 > ---------- > > Service 2P: > A POST at http://example.com/add containing a value in the body will > add that value to a variable maintained server-side. The sum is > available through a GET. > > -RequestA- > GET /add HTTP/1.1 > example.com > Accept: text/plain > --------- > > -ResponseA- > HTTP/1.1 200 OK > Content-Type: text/plain > > 110 > ---------- > > -RequestB- > POST /add HTTP/1.1 > example.com > Accept: text/plain > > 2 > --------- > > -ResponseB- > HTTP/1.1 200 OK > Content-Type: text/plain > > 112 > ---------- > > Ok, now XML versions of those: > > Service 1PX: > > -Request- > GET /xml/divide?x=6&y=2 HTTP/1.1 > example.com > Accept: text/plain > --------- > > -Response- > HTTP/1.1 200 OK > Content-Type: text/plain > > <result>2</result> > ---------- > > Service 1XX: > (angle brackets unescaped for clarity) > > -Request- > GET /xml/divide?query=<values><x>6</x><y>2</y></values> HTTP/1.1 > example.com > Accept: text/plain > --------- > > -Response- > HTTP/1.1 200 OK > Content-Type: text/plain > > <result>2</result> > ---------- > > Service 2XX: > > -RequestB- > POST add HTTP/1.1 > example.com > Accept: text/plain > > <value>2</value> > --------- > > -ResponseB- > HTTP/1.1 200 OK > Content-Type: text/plain > > <result>112</result> > ---------- > > > > -- > > http://dannyayers.com -- Mark Baker. Ottawa, Ontario, CANADA. http://www.markbaker.ca Coactus; Web-inspired integration strategies http://www.coactus.com
Received on Wednesday, 8 June 2005 19:52:07 UTC