Skip to content

Commit 1e30cee

Browse files
sborrazasbenoitc
authored andcommitted
Fix invalid type for hackney_ur:qs/2 options
1 parent 4a828f9 commit 1e30cee

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/hackney_url.erl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
-include("hackney_lib.hrl").
2727

2828
-type qs_vals() :: [{binary(), binary() | true}].
29+
-type qs_opt() :: noplus | upper.
2930

3031
%% @doc Parse an url and return a #hackney_url record.
3132
-spec parse_url(URL::binary()|list()) -> hackney_url().
@@ -288,7 +289,7 @@ urlencode(Bin) ->
288289
%% characters, `\s', as `+'. The `upper' option overrides the default behaviour
289290
%% of writing hex numbers using lowecase letters to using uppercase letters
290291
%% instead.
291-
-spec urlencode(binary() | string(), [noplus|upper]) -> binary().
292+
-spec urlencode(binary() | string(), [qs_opt()]) -> binary().
292293
urlencode(Bin, Opts) ->
293294
Plus = not proplists:get_value(noplus, Opts, false),
294295
Upper = proplists:get_value(upper, Opts, false),
@@ -344,7 +345,7 @@ qs(KVs) ->
344345

345346
%% @doc encode query properties to binary
346347
%% Opts are passed to urlencode.
347-
-spec qs(qs_vals(), [atom]) -> binary().
348+
-spec qs(qs_vals(), [qs_opt()]) -> binary().
348349
qs(KVs, Opts) ->
349350
qs(KVs, Opts, []).
350351

0 commit comments

Comments
 (0)