Browse thread
Basic Ocamlnet Question
-
Peter.Gregory@c...
- Oliver Bandel
-
Gerd Stolpmann
- Peter.Gregory@c...
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2007-08-14 (19:37) |
From: | Peter.Gregory@c... |
Subject: | Re: [Caml-list] Basic Ocamlnet Question |
> 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