Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curb HTTP client does not work with Traffic Client #20

Open
lhagemann opened this issue Dec 17, 2014 · 0 comments
Open

curb HTTP client does not work with Traffic Client #20

lhagemann opened this issue Dec 17, 2014 · 0 comments
Labels

Comments

@lhagemann
Copy link
Contributor

The HTTP client defined in dyn/http/curb does not properly pass in the the login credentials

The following sample shows the problem, (error output below)

require './lib/dyn-rb.rb'
require './lib/dyn/http/curb.rb'

require 'securerandom'

Dyn::HttpClient.const_set('DefaultClient',Class.new(Dyn::HttpClient::CurbClient))

## Set variables 
DYN_CUST = ENV['DYN_CUST'] || 'customer'
DYN_USER = ENV['DYN_USER'] || 'user'
DYN_PASS = ENV['DYN_PASS'] || 'secretword'
DYN_ZONE = ENV['DYN_ZONE'] || 'example.com'

dyn = Dyn::Traffic::Client.new(DYN_CUST, DYN_USER, DYN_PASS)

Error output:

dyn-rb/lib/dyn/traffic.rb:230:in `parse_response': Request failed: 
ERROR MISSING_DATA API-A - user_name: required field missing (Dyn::Exceptions::RequestFailed)
ERROR MISSING_DATA API-A - customer_name: required field missing
ERROR MISSING_DATA API-A - password: required field missing
    from dyn-rb/lib/dyn/traffic.rb:207:in `api_request'
    from dyn-rb/lib/dyn/traffic.rb:184:in `post'
    from dyn-rb/lib/dyn/traffic/session.rb:29:in `create'
    from dyn-rb/lib/dyn/traffic.rb:71:in `login'
    from dyn-rb/lib/dyn/traffic.rb:62:in `initialize'
    from dyn-rb/sample.rb:16:in `new'
    from dyn-rb/sample.rb:16:in `<main>'
@lhagemann lhagemann added the bug label Dec 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant