VISIT A URL PROGRAMATICALLY

K

kevid

hi all,

i have the code below;

require 'rexml/document'
require 'open-uri'
open('http://api.evdb.com/rest/users/login?app_key=ct2hJqTCg4XLCP5h')
{ |f|
$res = REXML::Document.new(f.read)
}

the xml data that is read is;

<?xml version="1.0" encoding="UTF-8"?>

<error string="Authorization Required">
<nonce>6984053721</nonce>
<description>Please supply a user authentication response using the
nonce provided.</description>
</error>

QUESTIONS

1. how do i get the value of nonce (i.e. 6984053721 )

2. is there another way of visiting the url "http://api.evdb.com/rest/
users/login?app_key=ct2hJqTCg4XLCP5h"
without using open-uri as in above


thoughts??
 
M

MrZombie

hi all,

QUESTIONS

1. how do i get the value of nonce (i.e. 6984053721 )

2. is there another way of visiting the url "http://api.evdb.com/rest/
users/login?app_key=ct2hJqTCg4XLCP5h"
without using open-uri as in above


thoughts??


I don't mean to be rude, but you should read the corresponding API
documentation.

http://api.evdb.com/docs/auth

The way you access a URL is good, the problem is about that specific one.
The link I provide should direct you in the right direction.
You also might want to check the mailing list, there is bound to be good info
on whatever it is that you seek.

Have a good day!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,271
Latest member
BuyAtenaLabsCBD

Latest Threads

Top