Skip to content

Commit

Permalink
Update lib/tesla.ex
Browse files Browse the repository at this point in the history
Co-authored-by: Yordis Prieto <[email protected]>
  • Loading branch information
RudolfMan and yordis committed Oct 24, 2024
1 parent 0c3a7b1 commit 715b75f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/tesla.ex
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,9 @@ defmodule Tesla do
iex> Tesla.build_url("http://api.example.com", [user_name: "John Smith"], :rfc3986)
"http://api.example.com?user_name=John%20Smith"
"""
@spec build_url(Tesla.Env.url(), Tesla.Env.query(), :rfc3986 | :www_form) :: binary
@type encoding_strategy :: :rfc3986 | :www_form

@spec build_url(Tesla.Env.url(), Tesla.Env.query(), encoding_strategy) :: binary
def build_url(url, query, encoding \\ :www_form)

def build_url(url, [], _encoding), do: url
Expand Down

0 comments on commit 715b75f

Please sign in to comment.