caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Peter.Gregory@cis.strath.ac.uk
To: "Gerd Stolpmann" <info@gerd-stolpmann.de>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Basic Ocamlnet Question
Date: Tue, 14 Aug 2007 20:37:15 +0100 (BST)	[thread overview]
Message-ID: <2030.84.13.120.98.1187120235.squirrel@webmail.cis.strath.ac.uk> (raw)
In-Reply-To: <1187113601.13041.31.camel@localhost.localdomain>

> The "convenience module" is only for simple requests. Do it as follows:
>
>> 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 url =
>   let msg = new post_raw url "<request> <token>mytoken</token>
</request>" in
>   (msg # request_header `Base) # update_field
>      "content-type" "application/xml";
>   let p = new pipeline in
>   p # add msg;
>   p # run();
>   print_string msg#response_body#value
> ;;
>
>
> Gerd
>

Thanks Gerd, that works fine.

Peter






      reply	other threads:[~2007-08-14 19:37 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 ` [Caml-list] " Oliver Bandel
2007-08-14 17:46 ` Gerd Stolpmann
2007-08-14 19:37   ` Peter.Gregory [this message]

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=2030.84.13.120.98.1187120235.squirrel@webmail.cis.strath.ac.uk \
    --to=peter.gregory@cis.strath.ac.uk \
    --cc=caml-list@yquem.inria.fr \
    --cc=info@gerd-stolpmann.de \
    /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;
as well as URLs for NNTP newsgroup(s).