cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
151
Views
10
Helpful
3
Replies
Highlighted
Beginner

make rest call goes to unsuccessful branch

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

Everyone's tags (5)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
VIP Mentor

Re: make rest call goes to unsuccessful branch

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.

Anthony Holloway

View solution in original post

3 REPLIES 3
Highlighted
Rising star

Re: make rest call goes to unsuccessful branch

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

Highlighted
VIP Mentor

Re: make rest call goes to unsuccessful branch

These are some great tips!

Anthony Holloway
Highlighted
VIP Mentor

Re: make rest call goes to unsuccessful branch

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.

Anthony Holloway

View solution in original post

CreatePlease to create content
Content for Community-Ad

Cisco COVID-19 Survey