Packages

A library for creating LTI 1.3 Tools in Gleam

Current section

Files

Jump to
lightbulb src lightbulb@providers@httpc_provider.erl
Raw

src/lightbulb@providers@httpc_provider.erl

-module(lightbulb@providers@httpc_provider).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([http_provider/0]).
-if(?OTP_RELEASE >= 27).
-define(MODULEDOC(Str), -moduledoc(Str)).
-define(DOC(Str), -doc(Str)).
-else.
-define(MODULEDOC(Str), -compile([])).
-define(DOC(Str), -compile([])).
-endif.
?MODULEDOC(false).
-file("src/lightbulb/providers/httpc_provider.gleam", 7).
?DOC(false).
-spec http_provider() -> lightbulb@providers@http_provider:http_provider().
http_provider() ->
{http_provider, fun(Req) -> _pipe = gleam@httpc:send(Req),
gleam@result:map_error(
_pipe,
fun(E) ->
<<"Error sending HTTP request: "/utf8,
(gleam@string:inspect(E))/binary>>
end
) end}.