Closed aaronpk closed 9 years ago
Hi, I added follow_codes
option. You can set it by
Unshorten::DEFAULT_OPTIONS[:follow_codes] = [301]
Or per request:
Unshorten['http://t.co/uQVbsZ4aL1', :follow_codes => [301]]
Hope that helps :)
That's great, thanks!! What's the best way to use this before it's published on rubygems?
oh nevermind, it looks like you just published it. Thanks again!
When un-shortening a URL like http://t.co/uQVbsZ4aL1, I actually want the end result to be the URL before the 302 is returned. 302 is a temporary redirect, so when un-shortening URLs to include the "final" URL in logs, the final archived URL should not be the result of the temporary redirect. I would be fine with this as an option rather than as the default behavior.