cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
576
Views
0
Helpful
2
Replies
Highlighted

How do I get an HTTP API response from a get/post

I'm trying to get a response from a simple url request with the api, but I can't seem to find a way to get the return information back.  I'm able to post information to a website correctly, but there is supposed to be a return body that displays if it was successful or not.  The following code is similar to what i'm trying to run. I want to be able to post information to a webserver, and get a response back from the page that is requested.

 

function run_command() {
var url = 'http://192.168.0.1/index.html&data=test';
var response = xapi.command('HttpClient Get', { 'Url': url});
console.log(response);
}


}

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Cisco Employee

2 REPLIES 2
Highlighted
Cisco Employee

Highlighted

This worked thank you. This helped me figure it out thanks.
Content for Community-Ad