About HTTP Connector Migration
The Mule 4 version of Anypoint Connector for HTTP (HTTP Connector) contains the following key differences from the Mule 3 version of the connector:
-
The
http:listener-configelement has a new inner connection elementhttp:listener-connection. -
The
http:request-configelement has a new inner connection elementhttp:request-connection. -
The HTTP body parameter replaces the source parameter in the request and is incorporated into the listener’s response and error response.
-
The HTTP Listener source and HTTP Request operation return attributes.
-
The HTTP Request configuration has the Enabled Cookie parameter set to
true(default). -
HTTP parsing has been removed because DataWeave now manages special MIME types. Use DataWeave syntax to read and write payloads.
-
The HTTP Load static resource operation XML code
static-resource-handleris renamed toload-static-resource. -
To access HTTP listener and HTTP request attributes, the following DataWeave syntax replaces the Mule Expression Language (MEL) expressions for accessing past properties:
#[attributes.<parameter>]For more information about mapping Mule 3.x MEL expressions to Mule 4 DataWeave expressions, refer to the HTTP Connector XML Reference documentation.
-
The following constructs are removed in Mule 4:
-
Request and response builders,
http:request-builderandhttp:response-builder -
Worker threading profile
The request, response, and error-response replace the builders. Using DataWeave expressions eliminates the need for building parameters.
-



