lib/reach5/api.rb in reach5-0.1.0 vs lib/reach5/api.rb in reach5-0.1.1

- old
+ new

@@ -34,16 +34,20 @@ # # } def post_login(provider:, provider_token:, provider_secret: nil, user_agent: nil) + params = { provider: provider, provider_token: provider_token, provider_secret: provider_secret, - user_agent: user_agent, } - HTTP.post("#{host}/api/v1/login", params: params).parse + + request = HTTP + request = request.headers("User-Agent": user_agent) if user_agent + request = request.post("#{host}/api/v1/login", params: params) + request.parse end # List profiles # # Example: