I am trying to connect to a website by using a token-based authentication. I was using Net::HTTP to connect, but on the API page I could not find a way to authenticate myself with a token. I only saw something for user/password.
How do I do this?
EDIT:
Code Sample:
`require 'rubygems'
require 'rest_client'
require 'base64'
require 'rubygems'
require 'rest_client'
require 'base64'
require 'net/http'
require 'net/https'
require 'logger'
url ="https://redcap.org/redcap/api/"
my_token= 'token value'
RestClient.post url, :token=>my_token`
This where I get an error.
The error I receive is:
c:/Ruby193/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/request.rb:
111:in parse_url': undefined method
match' for # (NoMeth
odError)