mirror of
https://github.com/lostisland/faraday.git
synced 2025-07-15 00:02:14 -04:00
Compare commits
2 Commits
cc7e7bcea9
...
f6c38689c6
Author | SHA1 | Date | |
---|---|---|---|
|
f6c38689c6 | ||
|
2b9a6241c6 |
@ -473,7 +473,7 @@ module Faraday
|
|||||||
if url && !base.path.end_with?('/')
|
if url && !base.path.end_with?('/')
|
||||||
base.path = "#{base.path}/" # ensure trailing slash
|
base.path = "#{base.path}/" # ensure trailing slash
|
||||||
end
|
end
|
||||||
url = url.to_s.gsub(':', '%3A') if Utils.URI(url.to_s).opaque
|
url = url.to_s.gsub(':', '%3A') if URI.parse(url.to_s).opaque
|
||||||
uri = url ? base + url : base
|
uri = url ? base + url : base
|
||||||
if params
|
if params
|
||||||
uri.query = params.to_query(params_encoder || options.params_encoder)
|
uri.query = params.to_query(params_encoder || options.params_encoder)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Faraday
|
module Faraday
|
||||||
VERSION = '2.7.3'
|
VERSION = '2.7.4'
|
||||||
end
|
end
|
||||||
|
@ -310,6 +310,21 @@ RSpec.describe Faraday::Connection do
|
|||||||
expect(uri.to_s).to eq('http://service.com/api/service%3Asearch?limit=400')
|
expect(uri.to_s).to eq('http://service.com/api/service%3Asearch?limit=400')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'with a custom `default_uri_parser`' do
|
||||||
|
let(:url) { 'http://httpbingo.org' }
|
||||||
|
let(:parser) { Addressable::URI }
|
||||||
|
|
||||||
|
around do |example|
|
||||||
|
with_default_uri_parser(parser) do
|
||||||
|
example.run
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'does not raise error' do
|
||||||
|
expect { conn.build_exclusive_url('/nigiri') }.not_to raise_error
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#build_url' do
|
describe '#build_url' do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user