Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 67320c5c3e09a23813367ff772d607d4a64642e5 1 parent 3cb8fbd
@runpaint authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/octopi.rb
View
1  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
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.