Introduction

Little (LFE) HTTP Client -- A light-weight LFE wrapper around lhttpc

lhc is library is meant to be a dead-simple HTTP client for LFE projects. That's all there is to it. It uses lhttpc under the hood, which can be a little cumbersome for those new to Erlang when used directly; as such, lhc will likely provide a welcome alternative.

Dependencies

To use lhc, you need to have the following:

  • Erlang
  • rebar3

Since version 0.2.0, the lhc library has moved to using rebar3 and no longer supports the old version of rebar. If, for whatever reason, your project cannot use rebar3, you'll need to use version 0.1.0 of the lhc library.

Installation

To use the rebar3 LFE plugin, update your rebar.config file like the following:

{plugins, [
   {rebar3_lfe, "0.4.4"}}}
  ]}.
{provider_hooks, [
   {pre, [{compile, {lfe, compile}}]}
  ]}.

Then update the deps directive in your rebar.config to pull down the latest lhc:

{deps, [
  ...
  {lhc, "0.4.0"}, 
]}.

Once your project has added the lhc dependency, you're ready to execute the rebar3 command for compiling LFE projects:

$ rebar3 lfe compile

If you want to compile both LFE and any Erlang code you have in your project, you can do both with one command:

$ rebar3 compile