lostisland / faraday

Simple, but flexible HTTP client library, with support for multiple backends.
https://lostisland.github.io/faraday
MIT License
5.74k stars 976 forks source link

Connection#build_exclusive_url: replace simple syntax #1481

Closed hyuraku closed 1 year ago

hyuraku commented 1 year ago

Description

apply the advice about Connection#build_exclusive_url's syntax in https://github.com/lostisland/faraday/issues/1349#issuecomment-1002170559

On a side note, the regex to check for a trailing slash here could be replaced with a simple base.path.end_with?('/') which probably is faster and more readable. Also here there's a direct call to URI.parse instead of Utils.URI(...) circumventing the custom URL parser.

Todos

List any remaining work that needs to be done, i.e:

Additional Notes

Optional section