caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: OCaml Mailing List <caml-list@inria.fr>
Subject: [Caml-list] ocamlnet question: get with arbitrary header
Date: Wed, 21 Mar 2018 19:29:11 +0000	[thread overview]
Message-ID: <m2po3x8by0.fsf@polytechnique.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 608 bytes --]

Hello,

I'm writing a small tool to fetch articles from wallabag, and as part of
the protocol I first need to get a token, then in subsequent calls I
need to provide it as a http header. I've been using
Nethttp_client.Convenience till now, but I don't see a way to specify an
http header. I looked at the documentation for Nethttp_client, and I'm
not seeing it either. Is there a way to set a header for a GET request
to Authorization with value Bearer foobar?

Thanks,

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 --]

             reply	other threads:[~2018-03-21 19:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-21 19:29 Alan Schmitt [this message]
2018-03-22 19:55 ` Gerd Stolpmann
2018-03-26  5:57   ` Alan Schmitt
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=m2po3x8by0.fsf@polytechnique.org \
    --to=alan.schmitt@polytechnique.org \
    --cc=caml-list@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;
as well as URLs for NNTP newsgroup(s).