Skip to content

Commit

Permalink
Show example of setting cacertfile, closes #412
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmach committed Sep 11, 2024
1 parent 89f8fa3 commit 380f1e9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/req.ex
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ defmodule Req do
iex> Req.post!("https://httpbin.org/post", form: [comments: "hello!"]).body["form"]
%{"comments" => "hello!"}
Set connection timeout:
iex> resp = Req.get!("https://httpbin.org", connect_options: [timeout: 100])
iex> resp.status
200
See [`run_finch`](`Req.Steps.run_finch/1`) for more connection related options and usage examples.
Stream request body:
iex> stream = Stream.duplicate("foo", 3)
Expand Down
4 changes: 4 additions & 0 deletions lib/req/steps.ex
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,10 @@ defmodule Req.Steps do
iex> Req.get!(url, connect_options: [transport_opts: [verify: :verify_none]])
Connecting with custom certificates:
iex> Req.get!(url, connect_options: [transport_opts: [cacertfile: "certs.pem"]])
Connecting through a proxy with basic authentication:
iex> Req.new(
Expand Down

0 comments on commit 380f1e9

Please sign in to comment.