def http_request(verb, path)
      klass = klass = Net::HTTP.const_get(verb.to_s.capitalize)
      request = klass.new(path)
      request.basic_auth(token, "X")
      request["Content-Type"] = "application/json"
      request
    end
def http_request(verb, path)
      klass = klass = Net::HTTP.const_get(verb.to_s.capitalize)
      request = klass.new(path)
      request.basic_auth(token, "X")
      request["Content-Type"] = "application/json"
      request
    end
Internal: Returns a Net::HTTPRequest object initialized with
 authentication and content headers set.

 verb  - A Symbol representing an HTTP verb.
 path  - The String path of the request.

 Examples

   http_request(:get, "/rooms.json")
   http_request(:post, "/room/1/speak.json")

 Returns a Net::HTTPRequest object.