# Consuming REST APIs with HTTP Request

*MuleSoft Developer Study Guide · Creating Application Networks · Last updated October 28, 2026 · https://www.certifyforce.com/study-guide/mulesoft-developer/creating-application-networks/consuming-rest-apis-with-http-request*

Configure the HTTP Request operation to call a REST API and predict the exact request it sends: base path plus path, URI and query parameters, the default GET method and its empty body, form bodies, response validators that decide when HTTP:NOT_FOUND is raised, and the response timeout.

- Certification: Salesforce MuleSoft Developer
- Exam section: Creating Application Networks
- Study guide: https://www.certifyforce.com/study-guide/mulesoft-developer

**Official exam objective:**

> Apply correct processors / syntax and predict outcomes to consume RESTful web services (RAML-based) and predict outcomes.

## What the exam expects

- Choose the documented way to call a REST API from a Mule 4 app: an HTTP Request operation (or an existing Exchange connector), not a Listener, Web Service Consumer or Database operation.
- Predict the exact URL an HTTP Request sends from its configuration's host, port and base path, the operation's path, and its `uri-params` and `query-params`.
- Predict the method and body sent: the default method is GET, GET sends no body, and a DataWeave `http:body` with a form-urlencoded output sends `key=value&...`.
- Use a response validator to treat a status such as 404 as success instead of raising `HTTP:NOT_FOUND`.
- Raise the response timeout when a slow API fails with `HTTP:TIMEOUT`.

Key terms:
- **Request configuration** (`http:request-config`): the global element holding the connection (host, port, protocol) and defaults such as base path and response timeout.
- **URI parameter**: a value substituted into a `{placeholder}` in the path.
- **Query parameter**: a key/value pair appended after `?`.
- **Response validator**: the rule that decides which status codes count as success.

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Default method | GET | [HTTP Connector Reference](https://docs.mulesoft.com/http-connector/latest/http-documentation) |
| Methods sending no body | GET and OPTIONS (HEAD too under Send Body Mode AUTO) | [Configure HTTP Request Operation](https://docs.mulesoft.com/http-connector/latest/http-request-ref), [HTTP Connector Reference](https://docs.mulesoft.com/http-connector/latest/http-documentation) |
| Default body | `#[payload]` | [HTTP Connector Reference](https://docs.mulesoft.com/http-connector/latest/http-documentation) |
| Base Path default | `/`, applied to all requests referencing the config | [HTTP Connector Reference](https://docs.mulesoft.com/http-connector/latest/http-documentation) |
| Default port | 80 for HTTP, 443 for HTTPS | [HTTP Connector Reference](https://docs.mulesoft.com/http-connector/latest/http-documentation) |
| Default validation | Status 400 or above raises an error | [Configure HTTP Request Operation](https://docs.mulesoft.com/http-connector/latest/http-request-ref) |
| 404 error type | `HTTP:NOT_FOUND` | [Error Handlers](https://docs.mulesoft.com/mule-runtime/latest/error-handling) |
| Response Timeout default | Inherited from `defaultResponseTimeout`, 10000 ms | [HTTP Connector Reference](https://docs.mulesoft.com/http-connector/latest/http-documentation), [Global Settings Configuration](https://docs.mulesoft.com/mule-runtime/latest/global-settings-configuration) |
| Follow Redirects default | `true` | [HTTP Connector Reference](https://docs.mulesoft.com/http-connector/latest/http-documentation) |
| SOAP without a connector | Web Service Consumer connector | [Consume Data from an API](https://docs.mulesoft.com/mule-runtime/latest/consume-data-from-an-api) |
| Form body result | `key1=value1&key2=value2`, Content-Type form-urlencoded | [Configure HTTP Request Operation](https://docs.mulesoft.com/http-connector/latest/http-request-ref) |

## Check yourself

- When a URI parameter is defined more than once in the same request, which value does the connector use?
- Why does a 500 response stop the flow even though the server answered?
- What URL does path `/customer/{customerID}` with URI parameter `customerID` = `20` produce on host `www.example.com`?
- When a success status code validator lists `200,201`, what happens to a response with any other status value?
- What port does a request use when the protocol is HTTPS and no port is set?

## Sources

- [Configure HTTP Request Operation](https://docs.mulesoft.com/http-connector/latest/http-request-ref)
- [HTTP Connector 1.12 Reference](https://docs.mulesoft.com/http-connector/latest/http-documentation)
- [Consume Data from an API](https://docs.mulesoft.com/mule-runtime/latest/consume-data-from-an-api)
- [HTTP Connector XML Reference](https://docs.mulesoft.com/http-connector/latest/http-connector-xml-reference)
- [Consume a REST Service Example](https://docs.mulesoft.com/http-connector/latest/http-consume-web-svc-task)
- [Error Handlers](https://docs.mulesoft.com/mule-runtime/latest/error-handling)
- [Global Settings Configuration](https://docs.mulesoft.com/mule-runtime/latest/global-settings-configuration)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 6 linked practice questions, and unlimited timed mock exams are included with the MuleSoft Developer pack (USD $19): https://www.certifyforce.com/practice-exams
