---
title: requestBodyStreamExhausted
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/urlerror/code/requestbodystreamexhausted
---

# requestBodyStreamExhausted

A body stream is needed but the client did not provide one.

## Declaration

```swift
static var requestBodyStreamExhausted: URLError.Code { get }
```

## Discussion

Discussion This impacts clients on iOS that send a POST request using a body stream but do not implement the URLSessionTaskDelegate method urlSession(_:task:needNewBodyStream:).

## See Also

### Error codes

- [appTransportSecurityRequiresSecureConnection](foundation/urlerror/code/apptransportsecurityrequiressecureconnection.md)
- [backgroundSessionInUseByAnotherProcess](foundation/urlerror/code/backgroundsessioninusebyanotherprocess.md)
- [backgroundSessionRequiresSharedContainer](foundation/urlerror/code/backgroundsessionrequiressharedcontainer.md)
- [backgroundSessionWasDisconnected](foundation/urlerror/code/backgroundsessionwasdisconnected.md)
- [badServerResponse](foundation/urlerror/code/badserverresponse.md)
- [badURL](foundation/urlerror/code/badurl.md)
- [callIsActive](foundation/urlerror/code/callisactive.md)
- [cancelled](foundation/urlerror/code/cancelled.md)
- [cannotCloseFile](foundation/urlerror/code/cannotclosefile.md)
- [cannotConnectToHost](foundation/urlerror/code/cannotconnecttohost.md)
- [cannotCreateFile](foundation/urlerror/code/cannotcreatefile.md)
- [cannotDecodeContentData](foundation/urlerror/code/cannotdecodecontentdata.md)
- [cannotDecodeRawData](foundation/urlerror/code/cannotdecoderawdata.md)
- [cannotFindHost](foundation/urlerror/code/cannotfindhost.md)
- [cannotLoadFromNetwork](foundation/urlerror/code/cannotloadfromnetwork.md)
