Comment on page
Debugging requests in the API Collection
The Debug panel on the API Collections allows you to see the content of the HTTP request and response messages after clicking "
Send" on the request panel.
Bravo exchanges data with an API by means of the HTTP protocol. When a request is sent, either from the Data Library or the Bravo app, Bravo sends an HTTP request message to the correspondent API endpoint. If the HTTP message arrives successfully (which is normally the case if the domain of the request URL is correct), an HTTP response message will be received back from the API, together with a status code.
The purpose of the Debug section is to show the content of those HTTP messages. It's split into two sections: one for the HTTP request message, and the other for the HTTP response message.
Each of the sections contains the following information:
- Request URL (only for the HTTP Request)
- Status Code (only for the HTTP Response)
- HTTP headers.
- HTTP body, in case the message contains one.
Sendin the Data Library, in case the HTTP exchange was carried out successfully, a
200 - OKstatus code will be returned from the API, together with the data fetched from that API endpoint. This data is part of the response body.
In case there was an error with the request, or with the API server itself, an error code will be returned on the response message. Besides the error code, information about the issue will usually be included in the response body. The information will depend on the configuration of the API we're communicating with.
When the remote API returns a
4XXerror code, check out the HTTP response body as it might contain useful information for debugging purposes.
In case the remote API returns a
500error code, check the spelling of the request URL and make sure it's correct.
That's it! 🥳