Current time: 12-17-2017, 12:54 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SCript + API
07-09-2014, 09:36 PM
Post: #1
SCript + API
I need to launch tests using the RestAPI and specify the IP to test. I'm trying to pass the script in the URL but I do smething wrong. ┬┐how can I pass two lines script as script parameter in the URL?

I use
setdns <host> <ip>
navigate <url>

How can I pass this as script argument?

thanks in advance.
Find all posts by this user
Quote this message in a reply
07-10-2014, 01:11 AM
Post: #2
RE: SCript + API
You need to urlencode it. For example, this script:

Code:
setdns    www.aol.com    1.2.3.4
navigate    www.aol.com

would be passed as:

Code:
&script=setdns%09www.aol.com%091.2.3.4%0Anavigate%09www.aol.com

If you use POST you would form-encode it.

I usually use http://meyerweb.com/eric/tools/dencoder/ to do the urlencoding if I'm doing it manually. In code whatever platform you are using to send the API calls should have support for url-encoding parameters.
Visit this user's website Find all posts by this user
Quote this message in a reply
07-14-2014, 05:19 PM
Post: #3
RE: SCript + API
Thanks Patrick!
(07-10-2014 01:11 AM)pmeenan Wrote:  You need to urlencode it. For example, this script:

Code:
setdns    www.aol.com    1.2.3.4
navigate    www.aol.com

would be passed as:

Code:
&script=setdns%09www.aol.com%091.2.3.4%0Anavigate%09www.aol.com

If you use POST you would form-encode it.

I usually use http://meyerweb.com/eric/tools/dencoder/ to do the urlencoding if I'm doing it manually. In code whatever platform you are using to send the API calls should have support for url-encoding parameters.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)