<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 8.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/URLRequest/httpBodyStream",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation10URLRequestV14httpBodyStreamSo07NSInputE0CSgvp"
  },
  "title" : "httpBodyStream"
}
-->

# httpBodyStream

The stream used to deliver the HTTP body.

```
var httpBodyStream: InputStream? { get set }
```

## Discussion

The stream is returned for examination only; it’s unsafe for the caller to manipulate the stream in any way.

> Note:
> The ``doc://com.apple.foundation/documentation/Foundation/URLRequest/httpBodyStream`` and ``doc://com.apple.foundation/documentation/Foundation/URLRequest/httpBody`` are mutually exclusive - only one can be set on a given request. The body stream is preserved across copies, but is lost when the request is coded via the ``doc://com.apple.foundation/documentation/Foundation/NSCoding`` protocol

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)