---
schema_version: "1"
id: aa54c54d8807e51632de1d531ee053a3ddf5f48b8a23d8ba431fce3dfdb67087
title: Reading and Writing Request Headers and Bodies
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/pdk/1.9/policies-pdk-configure-features-headers.md
canonical_url: https://docs.mulesoft.com/pdk/1.9/policies-pdk-configure-features-headers
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 93c9d6deffec28d811060961e5449bedbfe95bbff31f30e76d7dde7900863778
description: MuleSoft Documentation Site
release: "1.9"
latest: false
---
---
product: Omni Gateway Policy Development Kit (PDK)
version: 1.9
---

# Reading and Writing Request Headers and Bodies

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Omni Gateway Policy Development Kit (PDK), provides two seperate ways to read and write headers and
bodies. Choose either depending on your use case:

- [Reading and Writing Request Headers and Bodies with Separate Event States](https://docs.mulesoft.com/pdk/1.9/policies-pdk-configure-features-headers-event):
  Use the event flow method when you:

  - Don’t need to read the request body and don’t want to buffer the entire payload.

  - Need to stream the request payload.

- [Reading and Writing Request Headers and Bodies with Stop Iteration](https://docs.mulesoft.com/pdk/1.9/policies-pdk-configure-features-headers-stop):
  Use the stop iteration method when:

  - Your policy must read and write headers and bodies at the same time.
