cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1627
Views
10
Helpful
3
Replies

make rest call goes to unsuccessful branch

ravi.kumar1
Level 1
Level 1

created a simple script, modifying the script under the application and it goes to the unsuccessful branch

attaching the script, also tried this REST client plugin under firefox browser, i see this error, tried with both the content type :application/xml and application/json

restapi.JPG

1 Accepted Solution

Accepted Solutions

Anthony Holloway
Cisco Employee
Cisco Employee
Did you see in your SbodyHoliday variable, you are missing the "<" symbol in the beginning? Your FF screenshot has it, so we're not comparing apples to apples here. The content-type mixing is definitely the main problem in the FF screenshot. FWIW, your sbodyNonHoliday is correct.

View solution in original post

3 Replies 3

Graham Old
Level 7
Level 7

You can put or get data in a JSON or XML format. If its JSON that will be curly brackets and escaped double quotes. You are definitely XML so your content type must be application/xml

I always use the loop back IP address 127.0.0.1 instead of the server IP address. It always works then in a HA setup.

Using the Rest Call make a GET to "http://127.0.01/adminapi/application" and that will return you details about all your applications.

Cut out the response for your TomTest2 application starting with <application> and ending </application> and just try to Put it back unmodified. That should work and will give you a starting point.

Graham

These are some great tips!

Anthony Holloway
Cisco Employee
Cisco Employee
Did you see in your SbodyHoliday variable, you are missing the "<" symbol in the beginning? Your FF screenshot has it, so we're not comparing apples to apples here. The content-type mixing is definitely the main problem in the FF screenshot. FWIW, your sbodyNonHoliday is correct.