(Code Snippet 2)
_ (underscore) variable with HTTP Client Connector
When a request is made with the use of HTTP client connector, it returns multiple values which means the functions (get, post, put, patch, delete) are multi return functions. These functions, return HTTP response object and HTTP connector error object. If the request is successful, the response details (response payload, status code, etc) will be as HTTP response object and the HTTP connector error object will be null.
If the request is not successful, the HTTP connector error object will have the information (error message, cause for the error, etc) on error during HTTP client invocation and HTTP response object will be null.
The below code snippet explains the creation of an HTTP endpoint and making a GET request. And further, the HTTP connector error returned by the GET request is ignored by using the _ (underscore) variable.