---
schema_version: "1"
id: 124de04f642288feeb941dc6fc647b68256299caffd68c5bfcf091ba75115855
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/latest/policies-pdk-configure-features-headers.md
canonical_url: https://docs.mulesoft.com/pdk/latest/policies-pdk-configure-features-headers
source_site: docs.mulesoft.com
content_type: documentation
content_hash: a4e4b8faf1cfd3a8e076568ecbecada2fb5437825f43c94f4d008bb0d366b4bc
description: MuleSoft Documentation Site
release: "1.10"
latest: true
---
---
product: Omni Gateway Policy Development Kit (PDK)
version: 1.10
is-latest-version: true
---

# 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/latest/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/latest/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.
