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

# httpBodyStream

The request body as an input stream.

## Declaration

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

## Discussion

Discussion The request body of the receiver will be this input stream. The entire contents of the stream will be sent as the body, as in an HTTP POST request. The input stream should be unopened and the receiver will take over as the stream’s delegate. Setting a body stream clears any data in httpBody. These values are mutually exclusive.

## See Also

### Accessing request components

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