« Why readable XML matters, even to RDF | Main | IDEA and Ant annoyance »

I'd rather use a GET

Benefit of human readable protocols

Give this a try

The browser configuration string to do it:

  http://www.google.ie/search?q=absurd+obfuscation&num=10&hl=en&ie=latin1&oe=latin1&safe=false

The Python to do it:

  import httplib
  conn = httplib.HTTPConnection("www.google.com")
  conn.request("GET", "/search?q=absurd+obfuscation&num=10&hl=en&ie=latin1&oe=latin1&safe=false")
  r1 = conn.getresponse()
  print r1.status, r1.reason
  data1 = r1.read()
  conn.close()
  print data1

May 25, 2003 10:23 PM

Comments

Sam Ruby
(May 25, 2003 11:39 PM #)

That gets you the data. Of course, there is no description of what the output returned is, so you are at the whim and fancy of the provider.

If this is OK with the provider, and you are designing a protocol where there only ever is to be one server, this works just fine.

The point of a number of my essays is to explore what happens when you want to design a protocol which is to be supported by a number of different vendors, each with potentially unique requirements. In those cases, an XML interface has some advantages.

Trackback Pings

TrackBack URL for this entry:
http://www.dehora.net/mt/mt-tb.cgi/995