---
title: httpBodyStream
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/urlrequest/httpbodystream
---

# httpBodyStream

The stream used to deliver the HTTP body.

## Declaration

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

## Discussion

Discussion The stream is returned for examination only; it’s unsafe for the caller to manipulate the stream in any way. note: The httpBodyStream and 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 NSCoding protocol

## See Also

### Accessing request components

- [httpMethod](foundation/urlrequest/httpmethod.md)
- [url](foundation/urlrequest/url.md)
- [httpBody](foundation/urlrequest/httpbody.md)
- [mainDocumentURL](foundation/urlrequest/maindocumenturl.md)
