From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: Gerd Stolpmann <info@gerd-stolpmann.de>
Cc: OCaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] ocamlnet question: get with arbitrary header
Date: Mon, 26 Mar 2018 07:57:32 +0200 [thread overview]
Message-ID: <m2zi2vidkj.fsf@polytechnique.org> (raw)
In-Reply-To: <9a905c88-7201-baaf-7b13-ac892807f876@gerd-stolpmann.de> (Gerd Stolpmann's message of "Thu, 22 Mar 2018 20:55:44 +0100")
[-- Attachment #1: Type: text/plain, Size: 781 bytes --]
Hello Gerd,
On 2018-03-22 20:55, Gerd Stolpmann <info@gerd-stolpmann.de> writes:
> No, with the Convenience module you cannot do it. It's really meant for
> super-simple stuff only.
>
> But you can do:
>
> let pipeline = new Nethttp.pipeline in
> let call = new Nethttp_client.get url in
> call # set_request_header (new Netmime.basic_mime_header
> ["Authorization", ...]);
> pipeline # add call;
> pipeline # run()
>
> then check for call # response_* values. You can reuse the pipeline
> across calls.
Thank you for the tip. The API I'm interacting with also uses the PATCH
method, is there support for it in ocamlnet?
Best,
Alan
--
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2018-02: 408.35, 2017-02: 406.42
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 528 bytes --]
next prev parent reply other threads:[~2018-03-26 5:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-21 19:29 Alan Schmitt
2018-03-22 19:55 ` Gerd Stolpmann
2018-03-26 5:57 ` Alan Schmitt [this message]
2018-03-26 12:04 ` Gerd Stolpmann
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=m2zi2vidkj.fsf@polytechnique.org \
--to=alan.schmitt@polytechnique.org \
--cc=caml-list@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