philnash / bitly

🗜 A Ruby wrapper for the bit.ly API
https://rubygems.org/gems/bitly
MIT License
451 stars 139 forks source link

Use HTTPS not HTTP when communicating with api.bit.ly #56

Closed dmz006 closed 8 years ago

dmz006 commented 10 years ago

While setting up the bitly gem I noticed that the API URL is set to: API_URL = 'http://api.bit.ly/'

However when reviewing api.bitly.com, in their best practices I see their example of a valid API call to shorten the link uses: https://api-ssl.bitly.com/

Is there any plan on updating this gem to use the https link so api keys aren't transmitted in cleartext?

tompave commented 10 years ago

The SSL version is used in when connecting to the API v3:

https://github.com/philnash/bitly/blob/master/lib/bitly/v3/client.rb#L7

philnash commented 8 years ago

Well, this may have been a long time ago, but this has now been fixed in 301aa7a. Noone should be using the v2 API anyway, but if they do, next time I get a release out, it will use the https URL.