Error in Faraday and RubyGems API -


i want obtain list of gems of owner. http client faraday, i'm doing this:

connection = faraday.new "https://rubygems.org/api/v1/gems.json" connection.token_auth(token) response = connection.get 

but have error

"@body="access denied. please sign account @ http://rubygems.org"" 

i don't know if authenticating in wrong way or method. appreciate help. thanks.

just fyi solved header

    connection = faraday.new      response = connection.get 'https://rubygems.org/api/v1/gems.json', {},{'authorization' => token} 

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -