thinwrap_notifications_httpc (thinwrap_notifications v1.2.0)
View SourceDefault transport, built on OTP httpc.
Options (all optional), passed as transport => {thinwrap_notifications_httpc, Opts}:
timeout— whole-request budget in milliseconds (default30000).httpcitself defaults toinfinity, so a blackholed connection would otherwise hang the calling process forever.connect_timeout— milliseconds (default:timeout).profile— anhttpcprofile you started yourself (default:default). The library never starts a profile or any other process.ssl— a complete list ofsslclient options. Leave it out: since OTP 26httpcverifies the peer and its host name against the OS trust store by default, and passing anyssllist replaces those defaults rather than adding to them.
The adapter is HTTPS-only: an http:// (or any other) URL is refused with an
invalid_request error instead of being sent in cleartext. A self-hosted
endpoint on plain HTTP (a Mattermost or Rocket.Chat on an intranet) needs your
own transport.
Redirects are never followed.
Summary
Functions
-spec request(thinwrap_notifications_transport:request(), map()) -> {ok, thinwrap_notifications_transport:response()} | {error, term()}.
Send one request with httpc. See the module doc for Opts.