Browse files

Add credentials to `default_params` for auth'd GET.

We want the token and login to be sent for all authenticated queries. They
were being sent for POST requests, but, seemingly, not for GETs, causing
methods relying on the latter to fail. HTTParty's `default_params` method
causes parameters so set to be sent on every request. We specify `login` and
`token` as default parameters if the request is authenticated.
  • Loading branch information...
1 parent 3cb8fbd commit 67320c5c3e09a23813367ff772d607d4a64642e5 @runpaint committed Apr 23, 2009
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/octopi.rb
@@ -77,6 +77,7 @@ def initialize(login = nil, token = nil, format = "yaml")
@login = login
@token = token
@read_only = false
+ self.class.default_params :login => login, :token => token

0 comments on commit 67320c5

Please sign in to comment.