Using the HTTP or HTTPS protocol, the HTTP connector performs one of the following operations:
Mule preconfigures the first HTTP connector in an empty flow as a Listener and trigger. When the app runs and the Listener hears a request, the flow executes.
By default, the Listener configuration connects to CloudHub using HTTP and the Request configuration connects to port 80 using HTTP and GET. You can quickly configure an app to consume an HTTP service using the two HTTP connector instances as follows:
/somepath, for example
Note: This connector module only works with Mule 4 and Studio 7.
The HTTP connector has a Listener operation that receives requests over HTTP or HTTPS protocol. Receiving a request generates a Mule event and passes the request body to the next element of the flow as the message payload. You can refer to parts of the Event output. The method, headers, query parameters, and so on are returned in the attributes as
The response to a request can include the following information:
You can configure a response for a successful or failed execution of the flow of the listener. By default, the former presents the payload as a body and yields a 200 status code. By default, the latter presents the error description as a body and yields a 500 status code.