For a Mule 4 HTTP Request, put the corporate proxy in the connection used by that request configuration. The proxy element sits inside a proxy-config wrapper:

<http:request-config name="officeHttp">
  <http:request-connection host="api.example" port="80">
    <http:proxy-config>
      <http:proxy host="proxy.office.example" port="8080" />
    </http:proxy-config>
  </http:request-connection>
</http:request-config>

This fragment belongs in an existing Mule application with the HTTP connector namespace configured. The connection host identifies the destination API. The nested proxy host identifies the intermediary that will reach it.

An operation uses that route by referring to the configuration:

<http:request method="GET" path="/status" config-ref="officeHttp" />

The proxy element also accepts username and password when the intermediary requires them. The connector reference separately provides an NTLM proxy type for that authentication arrangement. Choose the type supplied by the deployed connector rather than placing a destination login into unrelated fields.

Mule 3 examples put several properties directly on the request configuration. Mule 4 groups connection properties beneath request-connection and wraps its proxy element as shown. Keeping the configuration named makes the route reusable: each HTTP Request operation referencing officeHttp uses that connection setup.

Ũhoro ũhĩtĩte