Thu 24 Feb 2005

Extensions to trivial-http

Scratching my own itch, I've slightly extended Brian Mastenbrook's trivial-http library to allow headers to be specified in calls (as association lists of strings). It's now possible to send off pretty much any HTTP POST or GET request, with arbitrary user-agents, headers, and whatnot. Return values are unchanged.
(http-post-h "http://example.com:8000/dir/"
"application/x-www-form-urlencoded" nil
'(("Accept" . "application/rdf+xml")
("Request-URI" . "temp://TestRequest1"))
"My User Agent")
I haven't suggested rolling these changes back into the library, because they actually make it non-trivial! (I have no objections, of course, and I hope this is of use to someone other than myself.)

Posted at 2005-02-24 06:59:27 by RichardLink to Extensions to triv…
Comments, trackbacks.

Google
Web holygoat.co.uk
  • richard is: