Cyril P.
Meung Sur Loire, France
May 16, 2019
23
Posts
Re: RESTful communication
Hello,
I am trying to communicate with an application that propose a REST API.
I have found an example in the knowledge base (ConsumingRESTfulServices)
It seems to work as I can receive the response body in case of positive answer from the server, but in case of negative answer I get an Ateasy runtime error.
So, I am not able to get the response body.
Is there a way to get the response body using Try/Catch and something else?
I have attached some picture to illustrate my trials.
Test_RESTful_Code.jpg : view of the Ateasy code
Test_RESTful_testlog.jpg : view of the log with the response body when it is working
Test_RESTful_Error.jpg : runtime error on the code line ws = request.GetResponse()
Test_RESTful_4_Expected_OK.jpg : view of the working request and it's expected response
Test_RESTful_4_Expected_NOK.jpg : view of the not working resquest (because the parameter are not good) and the expected response
Thanks for your help.
Cyril
File Attachment:
Test_RESTful.7z