Ok, Inside callback OnBeforeRequest WEB, there is an access, into informations and those are HTTPRequest and HTTResponse.
These infos can only be inside the callback action, and since we don't have the callback explicitly inside the logical flow, how do i should use those informations outside a CallBack Action .
All i want is the HTTP Response code inside the Plataform, I can get it using outside tools like Postman,
But, i need it inside my Application, so maybe i need to do a Server action with the responses whenever i do my Requests?
Hi Caio,
We have implemented error handling and for every HTTP code you can implement an exception handler. With that exception handler you can call some other server actions and do whatever you like with the response from the API.
We followed this blog to implement it: https://www.outsystems.com/blog/posts/handling-http-status-codes-consuming-rest/
Does that answer your question on how to use the HTTP Resonse?
Regards,
Ruben
Ruben van Vugt wrote:
Thanks Ruben!! That's just what i was thinking
Hi, Caio.To handle the response (HTTP code), you can search this documentation.You can implement logic within OnBefore or OnAfter to capture http status.
https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/REST/Consume_REST_APIs/Simple_Customizations
Nice! Don't forget marking the thread as solved