From 7a3e5135588d8a481a0d45f3e77cd3337f1a31f1 Mon Sep 17 00:00:00 2001 From: Rudolf Date: Fri, 3 Feb 2023 00:33:36 -0800 Subject: [PATCH] Update lib/tesla.ex Co-authored-by: Yordis Prieto --- lib/tesla.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/tesla.ex b/lib/tesla.ex index b6f74c19..db99e9b0 100644 --- a/lib/tesla.ex +++ b/lib/tesla.ex @@ -529,7 +529,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