File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
require 'json'
2
+ require 'uri'
2
3
require 'ruby-stackoverflow/client/response_data'
3
4
require 'ruby-stackoverflow/client/resource/resource'
4
5
require 'ruby-stackoverflow/client/resource/user'
@@ -56,8 +57,8 @@ def parse_response(data, klass)
56
57
def append_params_to_url ( url , options )
57
58
url = Configuration . api_url + url
58
59
options . merge! ( key_params )
59
- options = options . to_a . map { | k , v | " #{ k } = #{ v } " }
60
- url +'?' +options . join ( '&' )
60
+ options = URI . encode_www_form ( options )
61
+ url +'?' +options
61
62
end
62
63
63
64
def key_params
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ def parse_options(options = {})
14
14
else
15
15
options [ k ] = v
16
16
end
17
- end
17
+ end
18
18
end
19
19
20
20
def join_ids ( ids )
You can’t perform that action at this time.
0 commit comments