Skip to content

Commit 0a49fa1

Browse files
committed
Add deprecation warnings for replaced functions
1 parent 05ed7fc commit 0a49fa1

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/OAuth.jl

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ oauth_body_hash_encode,
1818
oauth_header,
1919
oauth_request_resource
2020

21+
2122
#############################################################
2223
#
2324
# OAuth Client Functions
@@ -69,6 +70,11 @@ function oauth_percent_encode_keys!(options::Dict)
6970
options
7071
end
7172

73+
@deprecate(
74+
oauth_percent_encode_keys(options::Dict),
75+
oauth_percent_encode_keys!(options::Dict)
76+
)
77+
7278
#Create query string from dictionary keys
7379
oauth_serialize_url_parameters(options::Dict) = join(
7480
["$key=$(options[key])" for key in sort!(collect(keys(options)))],
@@ -87,6 +93,11 @@ function encodeURI!(dict_of_parameters::Dict)
8793
return dict_of_parameters
8894
end
8995

96+
@deprecate(
97+
encodeURI(dict_of_parameters::Dict),
98+
encodeURI!(dict_of_parameters::Dict)
99+
)
100+
90101
function oauth_body_hash_file(filename::String)
91102
oauth_body_hash_data(readall(open(filename)))
92103
end
@@ -149,7 +160,7 @@ function oauth_request_resource(endpoint::String, httpmethod::String, options::D
149160
"Accept" => "*/*"
150161
)
151162
)
152-
163+
153164
if uppercase(httpmethod) == "POST"
154165
return Requests.post(URI(endpoint), query_str; headers = headers)
155166
elseif uppercase(httpmethod) == "GET"

0 commit comments

Comments
 (0)