I tried to put verify_ssl=>false
to the request, but it doesn\'t work.
Below is my code:
def login_request (username, password)
reques
Try this:
def login_request (username, password)
request = {'userName': username, 'password': password}.to_json
url = "#{$url_host}#{$login_api}"
begin
res = RestClient.post(
url,
request,
:content_type => :json, :accept => :json,
:verify_ssl => false)
response_data = JSON.parse(res.body)
$user_token = response_data['token']
$userId = response_data['user']['userId']
p response_data['user']['email']
rescue Exception => e
end
end
You can put the authentication details with :varify_ssl
.