From: Oliver Bandel <oliver@first.in-berlin.de>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Basic Ocamlnet Question
Date: Tue, 14 Aug 2007 19:39:14 +0200 [thread overview]
Message-ID: <1187113154.46c1e8c208ba5@webmail.in-berlin.de> (raw)
In-Reply-To: <1628.84.13.116.50.1187112599.squirrel@webmail.cis.strath.ac.uk>
Zitat von Peter.Gregory@cis.strath.ac.uk:
> Hi,
>
> I've just started messing about with ocamlnet, and have instantly run
> into a problem. I was trying to write some code that interfaced with the
> backpack API (http://developer.37signals.com/backpack/). I tried
> tweaking one of the examples just to get a page listing, and wrote the
> following:
>
>
> open Http_client.Convenience;;
>
> let get_and_print url =
> let s = http_post url [("","<request> <token>mytoken</token>
> </request>")] in
> print_string s;
> flush stdout
> ;;
>
> let () = get_and_print "http://pg.backpackit.com/ws/pages/all";;
>
>
> However, this doesn't work, as the header for the request should be
> "Content-Type: application/xml". How do I set the header for my request
> in ocamlnet?
[...]
The Convenience-Module is very convenient for simple
things, IMHO.
I have tried it and found it very funny to use.
But I think for more sophisticated things you have to use the
other modules. I'm not sure, but I think (as far as I have
seen it) the Convenience-module is not powerful enough for
special things.
There are a lot of other modules that can do what you want.
(No example here, because for my simple needs when I have
looked at it, I was happy enough with the Convenience module).
Ciao,
Oliver
next prev parent reply other threads:[~2007-08-14 17:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-14 17:29 Peter.Gregory
2007-08-14 17:39 ` Oliver Bandel [this message]
2007-08-14 17:46 ` [Caml-list] " Gerd Stolpmann
2007-08-14 19:37 ` Peter.Gregory
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1187113154.46c1e8c208ba5@webmail.in-berlin.de \
--to=oliver@first.in-berlin.de \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox