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

Not sure if to fail with no method or default to GET? [lib/watson/remote.rb] #83

Open
nhmood opened this issue Nov 21, 2013 · 0 comments

Comments

@nhmood
Copy link
Owner

nhmood commented Nov 21, 2013

filename : lib/watson/remote.rb
line # : 64
tag : review
md5 : 663b8e2b89d43c517ffed3360f37b4d7

        # [review] - Not sure if to fail with no method or default to GET?
        case opts[:method].upcase
        when "GET"
            _req = Net::HTTP::Get.new(_uri.request_uri)

        when "POST"
            _req = Net::HTTP::Post.new(_uri.request_uri)

        else
            debug_print "No method specified, cannot make HTTP request\n"
            return false
        end
            # Check for basic authentication key in hash
        if opts[:basic_auth].size == 2
            _req.basic_auth(opts[:basic_auth][0], opts[:basic_auth][1])
        end 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant